Is there anything wrong with this code? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Is there anything wrong with this code? (
/showthread.php?tid=367102)
Is there anything wrong with this code? -
ShawtyyMacJunior - 08.08.2012
Ive put together a code and it compiled fine, but somehow its still not working :
Код:
public OnPlayerEnterRaceCheckpoint(playerid)
{
new pName[MAX_PLAYER_NAME],stringg[128];
GetPlayerName(playerid,pName,sizeof(pName));
SendClientMessageToAll(0x33AA33AA,stringg);
PlayerPlaySound(playerid, 5461, 0.0, 0.0, 10.0);
format(stringg,sizeof(stringg),"%s is faster than you all, getting 1st place!",pName);
DisablePlayerRaceCheckpoint(playerid);
return 1;
}
Is there anything wrong with that?
Respuesta: Is there anything wrong with this code? -
[DOG]irinel1996 - 08.08.2012
Give a try now:
pawn Код:
public OnPlayerEnterRaceCheckpoint(playerid)
{
new pName[MAX_PLAYER_NAME],stringg[128];
GetPlayerName(playerid,pName,sizeof(pName));
PlayerPlaySound(playerid, 5461, 0.0, 0.0, 10.0);
format(stringg,sizeof(stringg),"%s is faster than you all, getting 1st place!",pName);
SendClientMessageToAll(0x33AA33AA,stringg); //after the format.
DisablePlayerRaceCheckpoint(playerid); //also here, if you're trying to do something as "who reach the checkpoint first", should disable the checkpoint for everybody.
/* Using this:
new t = GetMaxPlayers();
for(new p; p <= t; p++)
{
DisablePlayerRaceCheckpoint(p);
}
*/
return 1;
}
Best regards!
Re: Is there anything wrong with this code? -
Magic_Time - 08.08.2012
What do you want to do?