02.10.2015, 05:15
(
Последний раз редактировалось BigGreen; 02.10.2015 в 10:45.
Причина: Title fix
)
Hello so i have 3 things i need help with so number 1 when i try doing /gag on a player they are post to be muted from talking in In-character as its for a Roleplay script so basicly i want the player who i /gag to be muted Icly but he can talk in /b(Out of character) so here is the /gag code
Second problem i have is a /tazer command i want it to work like a real Tazer when the Police officer shoots it the police officer would have to wait some amount of time to re-charge so basicly just like real life Tazer's recharge time
Third problem i have is i want this command /badge to give the Police officers/SASD officer there firearms while doing /badge but it still lets them go on duty
i'll Rep who ever has helped me
Код:
command(gag, playerid, params[]) { new id, string[128]; if(sscanf(params, "u", id)) { SendClientMessage(playerid, WHITE, "SYNTAX: /gag [playerid]"); } else { if(!IsPlayerConnectedEx(id)) { SendClientMessage(playerid, WHITE, "That player is not connected or is not logged in."); } else { if(Player[playerid][Rags] >= 1) { if(GetDistanceBetweenPlayers(playerid, id) < 5) { if(Player[playerid][Cuffed] >= 1 || Player[playerid][HospitalTime] >= 1 || Player[playerid][Tied] >= 1 || Player[playerid][Tazed] >= 1) { SendClientMessage(playerid, WHITE, "You can't do this right now."); } else { if(Player[id][Tied] >= 1 || Player[id][Cuffed] >= 1) { Player[id][Gagged] = 1; format(string, sizeof(string), "* %s grabs a rag, and ties it around %s's mouth.", GetName(playerid), GetName(id)); NearByMessage(playerid, SCRIPTPURPLE, string); Player[playerid][Rags]--; } else { SendClientMessage(playerid, WHITE, "You must cuff/tie them first."); } } } else { SendClientMessage(playerid, WHITE, "You're too far away."); } } else { SendClientMessage(playerid, WHITE, "You have no rags left."); } } } return 1; }
Second problem i have is a /tazer command i want it to work like a real Tazer when the Police officer shoots it the police officer would have to wait some amount of time to re-charge so basicly just like real life Tazer's recharge time
Код:
command(tazer, playerid, params[]) { new string[128]; if(Groups[Player[playerid][Group]][CommandTypes] == 1 || Groups[Player[playerid][Group]][CommandTypes] == 4) { if(!IsPlayerInAnyVehicle(playerid)) { if(Player[playerid][Tazer] == 0) { ResetPlayerWeapons(playerid); GivePlayerWeaponEx(playerid, 47); format(string, sizeof(string), "* %s has withdrawn their tazer.", GetName(playerid)); NearByMessage(playerid, SCRIPTPURPLE, string); Player[playerid][Tazer] = 1; SetPlayerArmedWeapon(playerid, 23); } else { ResetPlayerWeapons(playerid); GivePlayerSavedWeapons(playerid); format(string, sizeof(string), "* %s has holstered their tazer.", GetName(playerid)); NearByMessage(playerid, SCRIPTPURPLE, string); Player[playerid][Tazer] = 0; } } else { SendClientMessage(playerid, WHITE, "You can't do this in a vehicle."); } } return 1; }
Код:
command(badge, playerid, params[]) { if(Player[playerid][Group] >= 1) { if(Groups[Player[playerid][Group]][CommandTypes] == 1 || Groups[Player[playerid][Group]][CommandTypes] == 4) { if(Player[playerid][CopDuty] == 0) { SetPlayerColor(playerid, Groups[Player[playerid][Group]][GroupColour] * 256 + 255); SendClientMessage(playerid, WHITE, "You have attached your badge, and are now being identified as on duty."); Player[playerid][CopDuty] = 1; } else { SetPlayerColor(playerid, 0xFFFFFFFF); SendClientMessage(playerid, WHITE, "You have deattached your badge, and are now being identified as off duty."); Player[playerid][CopDuty] = 0; } } } return 1; }