Is there anything wrong with this code?
#1

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?
Reply
#2

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!
Reply
#3

What do you want to do?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)