05.07.2014, 20:54
So im civilian and i can use /tazer i dont really get it
please help me
Code:
![Angry](images/smilies/evil.gif)
Code:
Код:
CMD:tazer(playerid, params[]) { if(IsACop(playerid) || Team_EDLS(playerid) && PlayerInfo[playerid][pDivision] == 2 || Team_EDLS(playerid) && PlayerInfo[playerid][pRank] >= 5 || (PlayerInfo[playerid][pMember] == 12 && PlayerInfo[playerid][pDivision] == 2)) { new string[128]; if(/*PlayerInfo[playerid][pConnectTime] < 2 ||*/PlayerInfo[playerid][pWRestricted] > 0) return SendClientMessageEx(playerid, COLOR_GRAD2, "You cannot use this as you are currently restricted from possessing weapons!"); if(IsPlayerInAnyVehicle(playerid)) { SendClientMessageEx(playerid, COLOR_GREY, "You can't do this while you're in a vehicle."); return 1; } if(GetPVarInt(playerid, "IsInArena") >= 0) { SendClientMessageEx(playerid, COLOR_WHITE, "You can't do this right now, you are in a arena!"); return 1; } if(GetPVarInt( playerid, "EventToken") != 0) { SendClientMessageEx(playerid, COLOR_GREY, "You can't use the tazer while you're in an event."); return 1; } if(PlayerCuffedTime[playerid] > 0) { SendClientMessageEx(playerid, COLOR_GREY, "You can't do this right now."); return 1; } if(GetPVarInt(playerid, "Injured") == 1) { SendClientMessageEx(playerid, COLOR_GREY, "You can't do this right now."); return 1; } if(PlayerInfo[playerid][pJailed] > 0) { SendClientMessageEx(playerid, COLOR_WHITE, "You cannot use this in jail/prison."); return 1; } if(PlayerCuffed[playerid] >= 1) { SendClientMessageEx(playerid, COLOR_WHITE, "You cannot use this while tazed/cuffed."); return 1; } if(pTazer[playerid] == 0) { pTazerReplace[playerid] = PlayerInfo[playerid][pGuns][2]; if(PlayerInfo[playerid][pGuns][2] != 0) RemovePlayerWeapon(playerid, PlayerInfo[playerid][pGuns][2]); format(string, sizeof(string), "* %s unholsters their tazer.", GetPlayerNameEx(playerid)); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); GivePlayerValidWeapon(playerid, 23, 60000); pTazer[playerid] = 1; } else { RemovePlayerWeapon(playerid, 23); GivePlayerValidWeapon(playerid, pTazerReplace[playerid], 60000); format(string, sizeof(string), "* %s holsters their tazer.", GetPlayerNameEx(playerid)); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); pTazer[playerid] = 0; } PlayerHasJustTakenTazer[playerid] = 1; SetTimerEx("TazerTakenDisable",3*1000,0,"i",playerid); } else { SendClientMessageEx(playerid, COLOR_GREY, " You are not a Cop / FBI / Coastguard!"); return 1; } return 1; }