Check point
#1

Ok so a checkpoint is added when /drop H-bomb is typed in, But it only apear's on that one persons screen, how can i make it go to everyong? er Sync?
Quote:

if(strcmp(cmdtext, "/drop H-bomb", true) == 0)
{
if(GetPlayerTeam(playerid) == 1) {
if(Nuking)
{
SendClientMessage(playerid,RED,"There is already a nuke planted.");
return 1;
}
if(GetPlayerSkin(playerid) == 285) {
SetPlayerCheckpoint(playerid, 316.0695,1037.8270,1944.0531,5.0);
SendClientMessageToAll(RED, "KILL THE SURVIVORS!");
}
//rest of the code is here
Reply
#2

SetPlayerCheckpoint(playerid, thats why you have playerid, so its gonna show for 1 person who does that command.
Reply
#3

ah right, so how could i make it show up for everyone? with a loop? for the player id? er something
Reply
#4

Search around. Im not sure about it. try -1
Reply
#5

Simple as a loop.

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
            {
                DisablePlayerCheckpoint(i);
                SetPlayerCheckpoint(i,x, y, z,CPSize);
            }
Reply
#6

if(GetPlayerSkin(playerid) == 285) {
new i = 0;
new allplayers = i < MAX_PLAYERS;
SetPlayerCheckpoint(allplayers, 316.0695,1037.8270,1944.0531,5.0);
SendClientMessageToAll(RED, "KILL THE SURVIVORS!");
}
so i made that loop, would that work?
edit;
Didnt see the one above
Quote:
Originally Posted by [B2K
Hustler ]
Simple as a loop.

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
            {
                DisablePlayerCheckpoint(i);
                SetPlayerCheckpoint(i,x, y, z,CPSize);
            }
Ill try that
Reply
#7

no that wont, give me 1 minute and i'll give u the correct way.

EDIT:

pawn Код:
if(strcmp(cmdtext, "/drop H-bomb", true) == 0)
{
    if(GetPlayerTeam(playerid) == 1)
    {
        if(Nuking) return SendClientMessage(playerid,RED,"There is already a nuke planted.");
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(GetPlayerSkin(i) == 285)
            {
              DisablePlayerCheckpoint(i);
                SetPlayerCheckpoint(i, 316.0695,1037.8270,1944.0531,5.0);
                SendClientMessageToAll(RED, "KILL THE SURVIVORS!");
                //rest of the code is here (for skin id 285 players
            }
        }
    }
    return 1;
}
Reply
#8

thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)