SA-MP Forums Archive
[HELP] Can someone help with Vortex script - 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: [HELP] Can someone help with Vortex script (/showthread.php?tid=320053)



[HELP] Can someone help with Vortex script - Stefand - 21.02.2012

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!


Re: [HELP] Can someone help with Vortex script - Smally - 21.02.2012

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


Re: [HELP] Can someone help with Vortex script - Konstantinos - 21.02.2012

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


Re: [HELP] Can someone help with Vortex script - Toreno - 21.02.2012

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;
}



Re: [HELP] Can someone help with Vortex script - niels44 - 21.02.2012

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.


Re: [HELP] Can someone help with Vortex script - Stefand - 21.02.2012

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


Re: [HELP] Can someone help with Vortex script - Boooth - 21.02.2012

Have you got TeamViewer? if so I will assist you.


Re: [HELP] Can someone help with Vortex script - niels44 - 21.02.2012

then put it under onplayerdeath XD


Re: [HELP] Can someone help with Vortex script - Stefand - 21.02.2012

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


Re: [HELP] Can someone help with Vortex script - Stefand - 21.02.2012

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