10.09.2015, 05:12
hey guys,
i need help, when i try to /tie at groove street team its work fine (it say: you are in the same team!)
the problem is when i change class to police and other class its not work fine (it cuffed me whenever i'm in the same team!) sorry for rip englsih
i need help, when i try to /tie at groove street team its work fine (it say: you are in the same team!)
the problem is when i change class to police and other class its not work fine (it cuffed me whenever i'm in the same team!) sorry for rip englsih
Код:
CMD:tie(playerid, params[]) { new otherid, string[120]; if (sscanf(params, "d", otherid)) return SendClientMessage(playerid, 0xB0B0B0AA, "[SERVER]: {FFFFFF}/Tie [playerid]"); if(!IsPlayerConnected(otherid)) return SendClientMessage(playerid, 0xB0B0B0AA, "[SERVER]: {FFFFFF}That player are not connected."); if(!ProxDetectorS(5.0, playerid, otherid)) return SendClientMessage(playerid, 0xB0B0B0AA, "[SERVER]: {FFFFFF}That player is not close enough."); if(GetPlayerTeam(playerid) == otherid) return SendClientMessage(playerid, 0xB0B0B0AA, "[SERVER]: {FFFFFF}That player are in your team!"); if(PlayerInfo[playerid][pRope] < 1) return SendClientMessage(playerid, 0xB0B0B0AA, "[SERVER]: {FFFFFF}You don't have any rope!."); if(IsPlayerCuffed(playerid) == true) return SendClientMessage(playerid, 0xB0B0B0AA, "[SERVER]: {FFFFFF}You are tied, can't use any commands."); if(IsPlayerCuffed(otherid) == true) return SendClientMessage(playerid, 0xB0B0B0AA, "[SERVER]: {FFFFFF}That player are already tied!"); if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xB0B0B0AA, "[SERVER]: {FFFFFF}You cannot tie when you are in vehicle."); if(IsPlayerInAnyVehicle(otherid)) return SendClientMessage(playerid, 0xB0B0B0AA, "[SERVER]: {FFFFFF}You cannot tie that player when in vehicle."); { SetPlayerCuffed(otherid, true); format(string, sizeof(string), "[SERVER]: {FFFFFF}You have been tied by %s(%d)!", GetName(playerid), playerid); SendClientMessage(otherid, 0xB0B0B0AA, string); format(string, sizeof(string), "[SERVER]: {FFFFFF}You have tie %s(%d)!", GetName(otherid), otherid); SendClientMessage(playerid, 0xB0B0B0AA, string); PlayerInfo[playerid][pRope]--; SetTimerEx("AntiTieAbuse",300000,0,"i",otherid); } return 1; } public OnPlayerSpawn(playerid) { SetPlayerHealth(playerid, 99999); SendClientMessage(playerid, 0x15D4EDAA, "[ANTI-SPAWNKILL]: {FFFF00}You have 5 second of Anti-spawnkill protection."); SetTimerEx("AntiSpawnkill",5000,0,"i",playerid); SetPlayerToTeamColor(playerid); if(gTeam[playerid] == GROVE) { if(PlayerInfo[playerid][pFirstSpawn] == 1) return ShowModelSelectionMenu(playerid, groveskin, "Select Skins"); SendClientMessage(playerid, -1, "You have joined {00FF00}Groove Street Family"); SetPlayerTeam(playerid, GROVE); return 1; } else if(gTeam[playerid] == POLICE) { if(PlayerInfo[playerid][pFirstSpawn] == 1) return ShowModelSelectionMenu(playerid, policeskin, "Select Skins"); SendClientMessage(playerid, -1, "You have joined {0000FF}Police Officers"); SetPlayerTeam(playerid, POLICE); return 1; } else if(gTeam[playerid] == AZTECAS) { if(PlayerInfo[playerid][pFirstSpawn] == 1) return ShowModelSelectionMenu(playerid, aztecasskin, "Select Skins"); SendClientMessage(playerid, -1, "You have joined {00FFFF}Aztecas"); SetPlayerTeam(playerid, AZTECAS); return 1; } else if(gTeam[playerid] == BALLAS) { if(PlayerInfo[playerid][pFirstSpawn] == 1) return ShowModelSelectionMenu(playerid, ballasskin, "Select Skins"); SendClientMessage(playerid, -1, "You have joined {FF00FF}Ballas"); SetPlayerTeam(playerid, BALLAS); return 1; } return 1; }