My Roleplay Server Backup system for cops aint working
#1

PHP код:
if(strcmp(cmd,"/backup",true)==0 || strcmp(cmd,"/bk",true)==0)
    {
        if(
IsPlayerConnected(playerid))
        {
            if(
IsACop(playerid) || IsAFreecop(playerid))
            {
                if(
PlayerInfo[playerid][pDBanned] == 1)
                {
                    
SendClientMessage(playerid, COLOR_GREY, "** You are banned From Cop Duty!");
                    return 
1;
                }
                if(
PlayerInfo[playerid][pDuty] == 0)
                {
                    
SendClientMessage(playerid, COLOR_GREY, "** You aren't on duty Duty!");
                    return 
1;
                }
                if (
PlayerInfo[playerid][pRequestingBackup] != 1)
                {
                    
format(string, sizeof(string), "ALL UNITS: %s is requesting immediate assistance, they have been marked on the map (red).", sendername);
                    
PlayerInfo[playerid][pRequestingBackup] = 1;
                    for(new 
i = 0; i < MAX_PLAYERS; i++)
                    {
                        if(
IsPlayerConnected(i))
                        {
                            if(
IsACop(i) || IsAFreecop(i))
                            {
                                if(
PlayerInfo[i][pDuty] == 1)
                                {
                                    
SetPlayerMarkerForPlayer(i, playerid, COLOR_YELLOW);
                                    
SendClientMessage(i, TEAM_BLUE_COLOR, string);
                                }
                            }
                        }
                    }
                    
SendClientMessage(playerid, TEAM_BLUE_COLOR, "Type /bkc to clear your backup request.");
                    
SetTimerEx("BackupClear", 180000, false, "ii", playerid, 1);
                    new 
y, m, d;
                    new 
h,mi,s;
                    
getdate(y,m,d);
                    
gettime(h,mi,s);
                    
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /backup",d,m,y,h,mi,s,sendername);
                    
CommandLog(string);
                }
                else
                {
                    
SendClientMessage(playerid, COLOR_GREY, "You already have an active backup request!");
                }
            }
            else
            {
                
SendClientMessage(playerid, COLOR_GREY, "You are not a cop!");
            }
        }
        return 
1;
    }
    
//-----------------=Radar Clear=-----------------
    //======Goes with Police Backup
    
if(strcmp(cmd,"/backupclear",true)==0 || strcmp(cmd,"/bkc",true)==0)
    {
        if(
PlayerInfo[playerid][pDBanned] == 1)
        {
              
SendClientMessage(playerid, COLOR_GREY, "** You are banned From Cop Duty!");
              return 
1;
        }
        
BackupClear(playerid, 0);
        new 
y, m, d;
        new 
h,mi,s;
        
getdate(y,m,d);
        
gettime(h,mi,s);
        
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /backupclear",d,m,y,h,mi,s,sendername);
        
CommandLog(string);
        return 
1;
    } 
Im wondering why it doesnt show up a point on the map like it shouldt do
Reply
#2

Anyone can help me out? i hope so my cops leave PD , ARMY , Swat , FBI , Because it aint work they will fail everytime
Reply
#3

I don't see nothing set on the map ?
Reply
#4

nope i dont see anything setten on the map , But i used to have it working on a older script but i deleted that so now ive no idea how to fix it so help me out pls xD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)