[HELP] Can someone help with Vortex script
#1

Hello,

I'm bussy to change the Vortex Script into an Cops 'n robbers script.
If its done i will release it.

But now i have a problem.

I want if the cops are on duty, they dont get a white color again so i tried this

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(Player[playerid][CopDuty] = 1){
        SetPlayerColor(playerid, COLOR_BLUE);
    }
    if(Player[playerid][MedicDuty] = 1){
        SetPlayerColor(playerid, COLOR_LGREEN);
    }
    return 1;
}
but that doesn't work..

Then they get automatich On DUTY.

Please help!
Reply
#2

You would have to set It so if copduty = 0 setplayercolor white
Reply
#3

Don't use it in OnPlayerSpawn Callback, but in the command for on duty.
Reply
#4

A command would be better, they will go on/off duty.
pawn Код:
if( !strcmp( "/duty", cmdtext, true, 5 ) )
{
    if( Player[ playerid ][ CopDuty ] )
        SetPlayerColor( playerid, COLOR_BLUE ), Player[ playerid ][ CopDuty ] = 0;
    else
        SetPlayerColor( playerid, -1 ), Player[ playerid ][ CopDuty ] = 1;

    return 1;
}
Reply
#5

have you defined when a player gets cop at spawn? becouse i cant see anything under the callback you posted here that the player is a cop or medic... so if you want it that this works when a player does a command i recommend you to put it under OnPlayerUpdate.
Reply
#6

I use Vortex game mode,
But if if a cop goes onduty at the LockerPostition he gets a Blue color.
If he die and respawns he get a white color...

So thats what i wanna change
Reply
#7

Have you got TeamViewer? if so I will assist you.
Reply
#8

then put it under onplayerdeath XD
Reply
#9

Quote:
Originally Posted by niels44
Посмотреть сообщение
then put it under onplayerdeath XD
Doesnґt work
Reply
#10

Quote:
Originally Posted by Boooth
Посмотреть сообщение
Have you got TeamViewer? if so I will assist you.
Yes i have
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)