1. Als ik mijn server start dan zie ik de personages niet maar als ik op shift druk (dus dan begin ik met spelen) dan zie ik ze wel.
2. Hoe kun je de coordinaten bereken of bekijken?
3. Hoe log je in als admin?
ysohnul zei op 18 Feb 2008, 17:34:44:
Citaat
ysohnul zei op 18 Feb 2008, 18:38:06:
Citaat
if (strcmp("/command", cmdtext, true)== 0){ // Als je /command intypt dan...
SendClientMessage(playerid,COLOR_BLUE,"Mijn commandos"); // zet je in de chatbox met de kleur blauw...
SendClientMessage(playerid,COLOR_YELLOW,"/command"); // en met de kleur geel...
return 1;
}
De hele callback + commando ziet er dan zo uit:
public OnPlayerCommandText(playerid, cmdtext[]){ // begin v/d callback
if (strcmp("/command", cmdtext, true)== 0){ // Als je /command intypt dan...
SendClientMessage(playerid,COLOR_BLUE,"Mijn commandos"); // in de chatbox met de kleur blauw...
SendClientMessage(playerid,COLOR_YELLOW,"/command"); // en met de kleur geel...
return 1;
}
return 0;
}
Let op de indentatie, de tabs (inspringing). Dit wil nog wel eens fout gaan in het begin, dan krijg je 'loose indentation' bij het compilen. Ook de kleur moet je wel definiëren, aan het begin met 'define #kleur #kleurcode'. Ik hoop dat je hiermee weer verder kunt. Mocht dat niet zo zijn raad ik je aan nog eens de tut door te lezen...
Dit bericht is aangepast door VWO-er: 18 februari 2008 - 19:15
Dit bericht is aangepast door ysohnul: 18 februari 2008 - 19:10
SA:MP 0.2.2 Server Setup ---------------------- Once the configuration is complete, run samp-server.exe to launch the server process. CONFIGURATION: Example server.cfg: echo Executing Server Config... lanmode 0 maxplayers 32 port 7777 hostname Unnamed Server announce 0 gamemode0 lvdm 1 gamemode1 rivershell 1 gamemode2 sniper 1 gamemode3 barron 1 gamemode4 sftdm 1 weburl www.sa-mp.com rcon_password changeme To configure the server, you must edit the values in server.cfg. They are explained below: hostname -------- Parameters: string Description: Specifies the hostname shown in the server browser port ---- Parameters: int Description: Specifies the port to listen on. This port is used for game connections, rcon connections, and for querying. maxplayers ---------- Parameters: int Description: Specifies the maximum amount of players. lanmode ------- Parameters: int (0 or 1) Description: Turns lanmode on (1) or off (0). Lanmode (as the name suggests) is for use on LAN games, where bandwidth is not a problem. Lanmode sends data at a higher rate, for a smoother game. announce ------- Parameters: int (0 or 1) Description: Announces your server to the 'Internet' server list in the SA:MP browser. On (1) or Off (0). weburl ------ Parameters: string Description: Specifies the URL shown in the server browser, which is associated to the server. rcon_password ------------- Parameters: string Description: Specifies the password needed to connect to rcon, or login to rcon ingame. gamemode0 - gamemode15 ---------------------- Parameters: string int Description: Specifies the rotation settings. The first parameter sets the game mode name. The second is the number of times it will repeat. You can use gamemode0 to specify the first gamemode, gamemode1 to specify the second, etc.
Dit bericht is aangepast door jimmyvanheel: 19 maart 2008 - 13:06
jimmyvanheel zei op 19 Mar 2008, 12:57:06:
#define TEAM_A 0 #define TEAM_B 1 static gTeam[MAX_PLAYERS];
SetPlayerColor(playerid, COLOR_GREY);
if(gTeam[playerid] == TEAM_A) {
SetPlayerColor(playerid,COLOR_RED); //Als de speler in 'TEAM_A' zit, maak hem dan 'rood'
}
else if(gTeam[playerid] == TEAM_B) {
SetPlayerColor(playerid,COLOR_BLUE); //Als de speler in 'TEAM_B' zit, maak hem dan 'blauw'
}
SetPlayerClass(playerid, classid) { //Als de speler de skin kiest, zet hem in een team:
if(classid == 0) { //Als speler skin nummer 0 (1e skin) kiest:
gTeam[playerid] = TEAM_A //Zet speler in TEAM_A
} else if(classid == 1) { //Als speler skin nummer 2 (2e skin) kiest:
gTeam[playerid] = TEAM_B; //Zet speler in TEAM_B
}
}