Police Backup CMD with location showing?
#1

Hey there. I have this script and I was wondering if any of you guys could help add the location to the backup. For example: "So and so is requesting backup at so and so location". Thanks.

pawn Код:
CMD:bk(playerid,params[])
{
    new string[128];
    new oname[24];
    new playerb;
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(!IsACop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an SAPD Oficer.");
    if(ReqBkRecent[playerid] == 1)
    {
        SendClientMessage(playerid, COLOR_ERROR, "You have asked for backup recently. Please wait before asking for backup again");
        return 1;
    }
    GetPlayerName(playerid,oname, 24);
    for(new i=0;i<GetMaxPlayers();i++)
    format(string, sizeof(string), "%s requesting BK!.", RPN(playerid), RPN(playerb));
    SendCopMessage(COLOR_DARKRED, string);
    ReqBk[playerid] =1;
    SetPlayerColor(playerid,COLOR_PURPLE);
    SetTimer("CopBackUpColour", 10000, 0);
    ReqBkRecent[playerid] =1;
    SetTimerEx("ReqBkRecentTime",50000,0,"i",playerid);
    return 1;
}
Reply
#2

pawn Код:
CMD:bk(playerid,params[])
{
    new string[128], oname[24] playerb;
    new Float:x, Float:y, Float:z;
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(!IsACop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an SAPD Oficer.");
    if(ReqBkRecent[playerid] == 1)
    {
        SendClientMessage(playerid, COLOR_ERROR, "You have asked for backup recently. Please wait before asking for backup again");
        return 1;
    }
    GetPlayerName(playerid,oname, 24);
    for(new i=0;i<GetMaxPlayers();i++)
    format(string, sizeof(string), "%s requesting BK!.", RPN(playerid), RPN(playerb));
    SendCopMessage(COLOR_DARKRED, string);
    ReqBk[playerid] =1;
    SetPlayerColor(playerid,COLOR_PURPLE);
    SetTimer("CopBackUpColour", 10000, 0);
    ReqBkRecent[playerid] =1;
    SetTimerEx("ReqBkRecentTime",50000,0,"i",playerid);
    if(IsACop(playerb))
    {
        GetPlayerPos(playerid, x, y, z);
        SetPlayerCheckpoint(playerb, x, y, z, 10);
    }
    return 1;
}
i hope this will do but i am not sure...
Reply
#3

pawn Код:
CMD:bk(playerid,params[])
{
    new string[128];
    new oname[24];
    new playerb;
    new Float:xpos,Float:ypos,Float:zpos,int
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(!IsACop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an SAPD Oficer.");
    if(ReqBkRecent[playerid] == 1)
    {
        SendClientMessage(playerid, COLOR_ERROR, "You have asked for backup recently. Please wait before asking for backup again");
        return 1;
    }
    GetPlayerName(playerid,oname, 24);
    for(new i=0;i<GetMaxPlayers();i++)
    format(string, sizeof(string), "%s requesting BK!.", RPN(playerid), RPN(playerb));
    SendCopMessage(COLOR_DARKRED, string);
    ReqBk[playerid] =1;
    SetPlayerColor(playerid,COLOR_PURPLE);
    SetTimer("CopBackUpColour", 10000, 0);
    ReqBkRecent[playerid] =1;
    GetPlayerPos(playerid, xpos, ypos, zpos); //Position backup.
    int = GetPlayerInterior(playerid); //Interior save.
    SetTimerEx("ReqBkRecentTime",50000,0,"i",playerid);
    return 1;
}
Now if you want to go to that old place.
pawn Код:
CMD:oldp(playerid,params[])
{
   SetPlayerPos(playerid, xpos, ypos, zpos);
   SetPlayerInterior(playerid, int);
   return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)