Jump to content

Question

Posted

Salut Sa-Mp.Ro , Mam apucat de un gamemode si am pus la onplayerdisconnect sa zica pe chat cand iese un player si cand compilez imi da o eroare.

Eroarea:

[pawn](83) : error 017: undefined symbol "reason"[/pawn]

OnPlayerDissconect:

[pawn]public OnPlayerDisconnect(playerid)

{

new nume[MAX_PLAYER_NAME];

new dstring[100 + MAX_PLAYER_NAME];

//========================================================================//

GetPlayerName(playerid, nume, sizeof(nume));

switch(reason)

{

case 0: format(dstring, sizeof(dstring), "{00CCFF}Jucatorul %s A Iesit De Pe Server (Timeout)", nume);

case 1: format(dstring, sizeof(dstring), "{00CCFF}Jucatorul %s A Iesit De Pe Server (Leaving/Crash)", nume);

case 2: format(dstring, sizeof(dstring), "{00CCFF}Jucatorul %s A Iesit De Pe Server (Kicked/Banned)", nume);

}

SendClientMessageToAll(0xFFFFFFAA, dstring);

return 1;

}[/pawn]

Deci... ma puteti ajuta?

5 answers to this question

Recommended Posts

Posted

incearca asa

[pawn]public OnPlayerDisconnect(playerid,reason)

{

new nume[MAX_PLAYER_NAME];

new dstring[100 + MAX_PLAYER_NAME];

//========================================================================//

GetPlayerName(playerid, nume, sizeof(nume));

switch(reason)

{

case 0: format(dstring, sizeof(dstring), "{00CCFF}Jucatorul %s A Iesit De Pe Server (Timeout)", nume);

case 1: format(dstring, sizeof(dstring), "{00CCFF}Jucatorul %s A Iesit De Pe Server (Leaving/Crash)", nume);

case 2: format(dstring, sizeof(dstring), "{00CCFF}Jucatorul %s A Iesit De Pe Server (Kicked/Banned)", nume);

}

SendClientMessageToAll(0xFFFFFFAA, dstring);

return 1;

}[/pawn]

Posted

Nu postasei eroarea !

incearca asa !

[pawn]public OnPlayerDisconnect(playerid,reason)

{

new nume[MAX_PLAYER_NAME];

new dstring[100 + MAX_PLAYER_NAME];

//========================================================================//

GetPlayerName(playerid, nume, sizeof(nume));

switch(reason)

{

case 0: format(dstring, sizeof(dstring), "{00CCFF}Jucatorul %s A Iesit De Pe Server (Timeout)", nume);

case 1: format(dstring, sizeof(dstring), "{00CCFF}Jucatorul %s A Iesit De Pe Server (Leaving/Crash)", nume);

case 2: format(dstring, sizeof(dstring), "{00CCFF}Jucatorul %s A Iesit De Pe Server (Kicked/Banned)", nume);

}

SendClientMessageToAll(0xFFFFFFAA, dstring);

return 1;

}

[/pawn]

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.