Tazer help?
#3

Quote:
Originally Posted by gurmani11
Посмотреть сообщение
PHP код:

CMD
:tazer(playeridparams[])
{
    new
    
string[128];
//to check if payer is a cop thn use it like this
    
if(!IsACop(playerid))return SCM(playeridCOLOR_LIGHTRED"[SERVER]: You are not a Cop!");// <<<<<
    
if(IsPlayerInAnyVehicle(playerid)) return SCM(playeridCOLOR_LIGHTRED"[SERVER]: You can't do this while you're in a vehicle.");
    if(
isAlive[playerid] > 0) return SCM(playeridCOLOR_LIGHTRED"[SERVER]: You can't do this while Dead!");
    if(
pTazer{playerid} == 0)
    {
        
pTazerReplace{playerid} = PlayerInfo[playerid][pWeapon1];
        
//if(PlayerInfo[playerid][pWeapon1][2] != 0) RemovePlayerWeapon(playerid, PlayerInfo[playerid][pWeapon1][2]);
        
format(stringsizeof(string), "* %s unholsters their tazer."GetName(playerid));
        
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        
GivePlayerWeapon(playerid23100);
        
pTazer{playerid} = 1;
    }
    else
    {
        
RemovePlayerWeapon(playerid23);
        
GivePlayerWeapon(playeridpTazerReplace{playerid}, 100);
        
format(stringsizeof(string), "* %s holsters their tazer."GetName(playerid));
        
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        
pTazer{playerid} = 0;
    }
    return 
1;

Thx! rep!
Reply


Messages In This Thread
Tazer help? - by N0FeaR - 10.12.2015, 15:15
Re: Tazer help? - by gurmani11 - 10.12.2015, 15:32
Re: Tazer help? - by N0FeaR - 10.12.2015, 15:56

Forum Jump:


Users browsing this thread: 1 Guest(s)