GTAOnline.net
San Andreas Multiplayer (sa:mp) => Scripting SA-MP [Pawn center] => Discussion démarrée par: othman le 02 Avril 2008, 18:43:26
-
je voudrai un truc sur pawno qui permet que le serveur affiche aux autres joueurs que le joueur a quitté le serveur parti ou kické ou banni donc en simplifiant ma demande je voudrai un truc pour que le serveur ecrive lenomdujoueurs a quitté le serveur (parti) ou lenomdujoueur a quitté le servuer (kické) ou lenomdujoueurs a quitté le serveur (banni) aidez moi svp aidez moi
-
Bonjour othman faut que tu face sa tu met sa
en haut de ton script dans les New tu met sa
new Ramp[MAX_PLAYERS];
new IsSpawn[MAX_PLAYERS] = 0;
apré sa tu le met dans public OnPlayerDisconnect(playerid, reason)
{
Ramp[playerid] = 0;
IsSpawn[playerid] = 0;
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
switch(reason)
{
case 0: format(string, sizeof(string), "%s a quitter le serveur. timeout", pName);
case 1: format(string, sizeof(string), "%s a quitter le serveur. déconecter", pName);
case 2: format(string, sizeof(string), "%s a etait kicker/banni. kick/bani", pName);
}
SendClientMessageToAll(0x0B9DF4FF, string);
SendDeathMessage(INVALID_PLAYER_ID, playerid, 201);
return 1;
}
et voila ces les commandes de base a ++++
-
bonjour teck ;),
il y des erreurs si tu peux les corriger stp mon ami
F:\PROGRA~1\ROCKST~1\GTASAN~1\ENTRAI~1\GAMEMO~1\stunt.pwn(859) : error 017: undefined symbol "string"
F:\PROGRA~1\ROCKST~1\GTASAN~1\ENTRAI~1\GAMEMO~1\stunt.pwn(859) : error 017: undefined symbol "string"
F:\PROGRA~1\ROCKST~1\GTASAN~1\ENTRAI~1\GAMEMO~1\stunt.pwn(859) : error 036: empty statement
F:\PROGRA~1\ROCKST~1\GTASAN~1\ENTRAI~1\GAMEMO~1\stunt.pwn(859) : fatal error 107: too many error messages on one line
pls aide moi teck
-
pour le string il faut que tu rajoute sa
new string[256]
Tien deja plus les erreurs des strings
{
Ramp[playerid] = 0;
IsSpawn[playerid] = 0;
new pName[MAX_PLAYER_NAME];
new string[256]//voila le Rajout
GetPlayerName(playerid, pName, sizeof(pName));
switch(reason)
{
case 0: format(string, sizeof(string), "%s a quitter le serveur. timeout", pName);
case 1: format(string, sizeof(string), "%s a quitter le serveur. déconecter", pName);
case 2: format(string, sizeof(string), "%s a etait kicker/banni. kick/bani", pName);
}
SendClientMessageToAll(0x0B9DF4FF, string);
SendDeathMessage(INVALID_PLAYER_ID, playerid, 201);
return 1;
}
Pour le reste je sais pas
Sinon sur le FS Admin de R@f il y a comme ca (qui est super )
public OnPlayerDisconnect(playerid, reason)
{
new pname[400], string[500];
GetPlayerName(playerid, pname, sizeof(pname));
if(reason == 0)
{
format(string, sizeof(string), "** %s à quitté le serveur. (Timeout) **", pname);
SendClientMessageToAll(COLOR_GREY, string);
print(string);
}
else if(reason == 1)
{
format(string, sizeof(string), "** %s à quitté le serveur. (Partit) **", pname);
SendClientMessageToAll(COLOR_GREY, string);
print(string);
}
else if(reason == 2)
{
format(string, sizeof(string), "** %s à quitté le serveur (Kicker) **", pname);
SendClientMessageToAll(COLOR_GREY, string);
print(string);
}
return 1;
}
-
avec ce que tu ma donné il ya des erreurs aussi mais j'ai vu celui de raf il marce impec je compile c'est sans erreurs mais reste que quelqu'un viens dnas le srveur puis quitte pour que je vois si ça marhce vraiment mais merci a toi et merci a raf et aussi a teck ^^