26.01.2014, 14:26
Hello guys ,i've a proplem with /accept rr cmd ,when i do /service rr it shows to RR workers that i've requested Repair ,but when a RR Worker do /accept rr [id] it says "No-one Has called Rapid Recovery"
here is the code
+ REP
here is the code
pawn Код:
else if(strcmp(params,"rr",true) == 0)
{
new targetid;
if(sscanf(params,"u",targetid)) return SendClientMessageEx(playerid,-1,"USAGE: /accept rr [Playerid/PartOfName]");
if(PlayerInfo[playerid][pMember] != 14) {
SendClientMessageEx(playerid, COLOR_GREY, " You are not apart of Rapid Recovery!");
return 1;
}
if(RRCallTime[playerid] > 0) {
SendClientMessageEx(playerid, COLOR_GREY, " You have already accepted a RR Call!");
return 1;
}
if(GetPVarInt(playerid, "Packages") >= 1 || RRAccepted[playerid] != 999 || TaxiAccepted[playerid] != 999 || EMSAccepted[playerid] != 999 || BusAccepted[playerid] != 999 || MedicAccepted[playerid] != 999 || MedicAccepted[playerid] != 999 || MechanicCallTime[playerid] >= 1) {
SendClientMessageEx(playerid, COLOR_WHITE, "Please ensure that your current checkpoint is destroyed first (you either have material packages, or another existing checkpoint).");
return 1;
}
if(IsPlayerConnected(targetid))
{
if(playerid == targetid) return 1;
if(RequestedRRService[playerid] == 0) return SendClientMessageEx(playerid,-1,"That player must have cancelled their request!");
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(targetid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* You have accepted the RR Call from %s",giveplayer);
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
//SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* After the 60 Seconds the Red Marker will dissapear.");
format(string, sizeof(string), "* Rapid Worker %s has accepted your RR Call, please wait at your current position.",sendername);
SendClientMessageEx(targetid, COLOR_LIGHTBLUE, string);
new Float:X,Float:Y,Float:Z;
GetPlayerPos(targetid, X, Y, Z);
SetPlayerCheckpoint(playerid, X, Y, Z, 5);
GameTextForPlayer(playerid, "~w~RR Caller~n~~r~Goto redmarker", 5000, 1);
//RRCallTime[playerid] = 1;
RRAccepted[playerid] = targetid;
targetid = 999;
return 1;
}
}
else {
SendClientMessageEx(playerid, COLOR_GREY, " No-one has called for Rapid Recovery!");
return 1;
}
}