/panic command error
#1

I have this :

pawn Код:
if(strcmp(cmd, "/panic", true) == 0)
    {
        new name[MAX_PLAYERS],x;
        GetPlayerName(playerid, name, sizeof(name));
        if(team[playerid] == 2) return SendClientMessage(playerid, YELLOW, "You are not a human.");
        if(team[playerid] != 1) return SendClientMessage(playerid, YELLOW, "You must stay calm.");
        format(string, sizeof(string), "%s is Panicing and needs assistance.", name);
        for(x=0;x<MAX_PLAYERS;x++)
        {
            if(team[x] != 2)
            {
                new Float:X3,Float:Y3,Float:Z3;
                DisablePlayerCheckpoint(x);
                GetPlayerPos(x,X3,Y3,Z3);
                SetPlayerCheckpoint(x,X3,Y3,Z3,8.0);
            }
        }
        SendClientMessageToAll(YELLOW,string);
        return 1;
    }
I want it to when a player uses it set a checkpoint on him, and everyone can see it. What's wrong on it ?
Reply
#2

you mean this? https://sampwiki.blast.hk/wiki/SetPlayerColor
Reply
#3

no, I mean, create a checkpoint on the player's location.

Get it ?
Reply
#4

any help ?
Reply
#5

i dont see a problem in script

what do u mean u want everyone to see it?
Reply
#6

like, when a player uses the command /panic it will create a checkpoint on his position and show it to everyone (on the radar), but now when a player uses it creates a checkpoint on all the other players positions (but only one on the radar, and not on the one that uses it).
Reply
#7

Hold up you are confusing me so
You want the checkpoint to show for few players? or few teams on the radar
Reply
#8

Quote:
Originally Posted by Kitten
Посмотреть сообщение
Hold up you are confusing me so
You want the checkpoint to show for few players? or few teams on the radar
I think he ment he wanted it to show on just the player that used the command ..
Reply
#9

He wants it so like if the player is panicing,only cops can see checkpoints.
Reply
#10

Well first off
pawn Код:
if(team[playerid] != 1) return SendClientMessage(playerid, YELLOW, "You must stay calm.");
Why would you do that? It would just redirect it to team 2 which is zombies :P and i think he mean when the player does /panic it shows a checkpoint to ALL players.
Reply
#11

Quote:
Originally Posted by airsoftglock
Посмотреть сообщение
Well first off
pawn Код:
if(team[playerid] != 1) return SendClientMessage(playerid, YELLOW, "You must stay calm.");
Why would you do that? It would just redirect it to team 2 which is zombies :P and i think he mean when the player does /panic it shows a checkpoint to ALL players.
pawn Код:
if(team[playerid] != 1) return SendClientMessage(playerid, YELLOW, "You must stay calm.");
You got the idea, but what's wrong with that ?
Reply
#12

SetPlayerCheckpoint

That means for the PLAYER ONLY to see. Get a streamer then make a checkpoint.
Reply
#13

Quote:
Originally Posted by willsuckformoney
Посмотреть сообщение
SetPlayerCheckpoint

That means for the PLAYER ONLY to see. Get a streamer then make a checkpoint.
Yep, but make sure you set the draw distance high enough.
Reply
#14

Quote:
Originally Posted by marinov
Посмотреть сообщение
pawn Код:
if(team[playerid] != 1) return SendClientMessage(playerid, YELLOW, "You must stay calm.");
You got the idea, but what's wrong with that ?
You put in there
pawn Код:
if(team[playerid] == 2) return SendClientMessage(playerid, YELLOW, "You are not a human.");
and if you do
pawn Код:
if(team[playerid] != 1) return SendClientMessage(playerid, YELLOW, "You must stay calm.");
it will say that to people that are any other team but team 1. I hope you get what im saying. Im confuseing myself :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)