28.09.2013, 16:46
as the title say , i have CMD:Backup to give other police coordinat where our location.
and now im using this code but if my friend do /backup , i cant see the red marker on map telling where he is
what should i do ? any miss or wrong on that code ?
and now im using this code but if my friend do /backup , i cant see the red marker on map telling where he is
Код:
CMD:backup(playerid, params[]) { if(gTeam[playerid] == 2 || IsACop(playerid) || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 4 && PlayerInfo[playerid][pDivision] == 2 || PlayerInfo[playerid][pMember] == 4 && PlayerInfo[playerid][pRank] >= 5) { if (Backup[playerid] != 1) { new zone[MAX_ZONE_NAME], string[40 + MAX_PLAYER_NAME]; GetPlayer3DZone(playerid, zone, sizeof(zone)); format(string, sizeof(string), "* %s requests backup over their radio.", GetPlayerNameEx(playerid)); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); format(string, sizeof(string), "%s is requesting immediate backup at %s.", GetPlayerNameEx(playerid), zone); Backup[playerid] = 1; foreach(Player, i) { if(gTeam[i] == 2 || IsACop(i)) { SetPlayerMarkerForPlayer(i, playerid, 0xFF0000FF); SendClientMessageEx(i, TEAM_BLUE_COLOR, string); } } SendClientMessageEx(playerid, COLOR_WHITE, "Type /nobackup to clear your backup request."); SetTimerEx("BackupClear", 180000, false, "ii", playerid, 1); } else { SendClientMessageEx(playerid, COLOR_GREY, " You already have an active backup request!"); } } else { SendClientMessageEx(playerid, COLOR_GRAD2, " You are not a LAPD / LASD!"); } return 1; } CMD:nobackup(playerid, params[]) { BackupClear(playerid, 0); return 1; } CMD:fdbackup(playerid, params[]) { if(gTeam[playerid] == TEAM_CYAN||PlayerInfo[playerid][pMember]==4||PlayerInfo[playerid][pLeader]==4)//model { if(Backup[playerid] != 1) { new string[128]; format(string, sizeof(string), "* %s requests backup over their radio.", GetPlayerNameEx(playerid)); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); format(string, sizeof(string), "HQ: %s is requesting immediate assistance, radio for additional details. %s's location has been transmitted to your GPS [See Pink Dot].", GetPlayerNameEx(playerid), GetPlayerNameEx(playerid)); Backup[playerid] = 1; foreach(Player, i) { if(gTeam[i] == TEAM_CYAN||PlayerInfo[i][pMember]==4||PlayerInfo[i][pLeader]==4)//model { new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X, Y, Z); SetPlayerCheckpoint(i, X, Y, Z, 5); SetPlayerMarkerForPlayer(i, playerid, TEAM_CYAN_COLOR); SendClientMessageEx(i, TEAM_CYAN_COLOR, string); } } SendClientMessageEx(playerid, COLOR_WHITE, "Type /nobackup to clear your backup request."); SetTimerEx("BackupClear", 180000, false, "ii", playerid, 1); } else { SendClientMessageEx(playerid, COLOR_GREY, " You already have an active backup request!"); } } else { SendClientMessageEx(playerid, COLOR_GRAD2, " You are not in the LAFD!"); } return 1; }