if(GetPlayerWantedLevel(targetid) == 4 & 100)
{
TimerArrest[targetid] = SetTimerEx("BeginArrestedTimer", 10000, false,"i", targetid); // 10 Secdons timer
BeginArrested[targetid] = 1;
SetPlayerSpecialAction(targetid, SPECIAL_ACTION_CUFFED);
ApplyAnimation(playerid, "ped", "ARRESTgun", 4.1, 0, 1, 1, 1, 1);
new ArrestReward = random(15000) + 2500;
if(ArrestReward > GetPlayerCash(playerid))
SetPlayerAttachedObject(targetid, 8, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000, 1.168000);
format(string, sizeof(string), "{0080FF}[BEING ARRESTED]: {FFFFFF}Law Enforcement Officer %s(%d) has put {ADFF2F}Handcuffs {FFFFFF}on you.", pName, playerid);
format(string, sizeof(string), "You have placed {0080FF}%s(%d) {FFFFFF}in Handcuffs for an Arrest. Use {0080FF}/search (id) {FFFFFF}to search Him for illegal Drugs.", tName, targetid);
SendClientMessage(targetid, -1, "{0080FF}[BEING ARRESTED]: {FFFFFF}Use {0080FF}/breakcuffs (/bc) {FFFFFF}to attempt to evade the Arrest.");
format(string, sizeof(string), "{ffffff}You have Arrested {FFD700}%s(%d){FFFFFF}. You have received {33FF33}$%d {FFFFFF}for this Arrest.", tName, targetid, ArrestReward);
SendClientMessage(playerid, red, string);
format(string, sizeof(string), "{0080FF}[ARRESTED]: {FFD700}%s(%d) {FFFFFF}has been {33CCFF}Arrested {FFFFFF}by {308AFF}Officer %s(%d){FFFFFF}!", tName, targetid, pName, playerid);
SendClientMessageToAll(yellow, string);
format(string, sizeof(string), "~w~You have ~G~Arrested ~Y~%s(%d)~n~n~You have received ~n~n~~y~$%d ~w~for this Arrest.", tName, targetid, ArrestReward);
GameTextForPlayer(playerid, string, 7000, 5);
GivePlayerMoney(playerid, ArrestReward);
SetPlayerScore(playerid, GetPlayerScore(playerid)+1);
SetPlayerScore(playerid, GetPlayerScore(targetid)-1);
pJailTimerID[targetid] = SetTimerEx("pJailTimer", 1000, true, "i", targetid);
pJailCount[targetid] = 80 + random(100);
new Random = random(sizeof(RandomJailSpawns));
SetPlayerPos(targetid, RandomJailSpawns[Random][0], RandomJailSpawns[Random][1], RandomJailSpawns[Random][2]);
SetPlayerFacingAngle(targetid, RandomJailSpawns[Random][2]);
ResetPlayerWeapons(targetid);
SetPlayerColor(targetid, COLOR_WHITE);
SetPlayerInterior(targetid, 3);
SetPlayerWantedLevel(targetid,0);
SetPVarInt(playerid,"ArTime",GetTickCount()+5000);
}
SetPlayerPos(targetid, RandomJailSpawns[Random][0], RandomJailSpawns[Random][1], RandomJailSpawns[Random][2]);
SetPlayerFacingAngle(targetid, RandomJailSpawns[Random][2]);
if(GetPlayerWantedLevel(targetid) == 4 & 100)
{
TimerArrest[targetid] = SetTimerEx("BeginArrestedTimer", 10000, false,"i", targetid); // 10 Secdons timer
BeginArrested[targetid] = 1;
SetPlayerSpecialAction(targetid, SPECIAL_ACTION_CUFFED);
ApplyAnimation(playerid, "ped", "ARRESTgun", 4.1, 0, 1, 1, 1, 1);
new ArrestReward = random(15000) + 2500;
if(ArrestReward > GetPlayerCash(playerid))
SetPlayerAttachedObject(targetid, 8, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000, 1.168000);
format(string, sizeof(string), "{0080FF}[BEING ARRESTED]: {FFFFFF}Law Enforcement Officer %s(%d) has put {ADFF2F}Handcuffs {FFFFFF}on you.", pName, playerid);
format(string, sizeof(string), "You have placed {0080FF}%s(%d) {FFFFFF}in Handcuffs for an Arrest. Use {0080FF}/search (id) {FFFFFF}to search Him for illegal Drugs.", tName, targetid);
SendClientMessage(targetid, -1, "{0080FF}[BEING ARRESTED]: {FFFFFF}Use {0080FF}/breakcuffs (/bc) {FFFFFF}to attempt to evade the Arrest.");
format(string, sizeof(string), "{ffffff}You have Arrested {FFD700}%s(%d){FFFFFF}. You have received {33FF33}$%d {FFFFFF}for this Arrest.", tName, targetid, ArrestReward);
SendClientMessage(playerid, red, string);
format(string, sizeof(string), "{0080FF}[ARRESTED]: {FFD700}%s(%d) {FFFFFF}has been {33CCFF}Arrested {FFFFFF}by {308AFF}Officer %s(%d){FFFFFF}!", tName, targetid, pName, playerid);
SendClientMessageToAll(yellow, string);
format(string, sizeof(string), "~w~You have ~G~Arrested ~Y~%s(%d)~n~n~You have received ~n~n~~y~$%d ~w~for this Arrest.", tName, targetid, ArrestReward);
GameTextForPlayer(playerid, string, 7000, 5);
GivePlayerMoney(playerid, ArrestReward);
SetPlayerScore(playerid, GetPlayerScore(playerid)+1);
SetPlayerScore(playerid, GetPlayerScore(targetid)-1);
SetPVarInt(playerid,"ArTime",GetTickCount()+5000);
}
forward BeginArrestedTimer(targetid);
public BeginArrestedTimer(targetid)
{
pJailTimerID[targetid] = SetTimerEx("pJailTimer", 1000, true, "i", targetid);
pJailCount[targetid] = 80 + random(100);
new Random = random(sizeof(RandomJailSpawns));
SetPlayerPos(targetid, RandomJailSpawns[Random][0], RandomJailSpawns[Random][1],
RandomJailSpawns[Random][2]);
SetPlayerFacingAngle(targetid, RandomJailSpawns[Random][2]);
ResetPlayerWeapons(targetid);
SetPlayerColor(targetid, COLOR_WHITE);
SetPlayerInterior(targetid, 3);
SetPlayerWantedLevel(targetid,0);
return 1;
}
error 025: function heading differs from prototype error 025: function heading differs from prototype
forward BeginArrestedTimer(targetid);
public BeginArrestedTimer(targetid)
I've got 2errors:
Код:
error 025: function heading differs from prototype error 025: function heading differs from prototype PHP код:
|
CMD:ar(playerid, params[])
{
new pName[MAX_PLAYER_NAME],tName[MAX_PLAYER_NAME],targetid,string[128];
new Float:targetidpos[3];
if(GetPlayerSkin(playerid) == 280 && 281 && 285 && 287 && 282 && 286) return SendClientMessage(playerid, -1, "{FF0000}Error: {FFFFFF}You can't ues this command.");
if(GetPlayerInterior(targetid) > 0) return SendClientMessage(playerid, red, "{FF0000}Error: {ffffff} You can't arrest players inside an interior.");
if(sscanf(params, "ui", playerid)) SendClientMessage(playerid, COLOR_WHITE, "USAGE: /ar <ID/NAME>");
if(GetPVarInt(playerid,"ArTime")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"{FF0000}Error: {ffffff}Please wait 5 seconds before arresting a suspect again.");
if(PlayerInfo[targetid][pJailed] == 1) return SendClientMessage(playerid, red, "{FF0000}Error: {ffffff}This player is already in jail,you can't arrest him.");
if(IsPlayerInAnyVehicle(targetid)) return SendClientMessage(playerid,red,"{FF0000}Error: {ffffff}You can't arrest players if they're in a vehicle.");
if(GetPlayerWantedLevel(targetid) == 3) return SendClientMessage(playerid, red, "{FF0000}Error: {ffffff} You can't arrest players with wanted level lower than, Use /tk to issue a ticket.");
if(GetPlayerWantedLevel(targetid) == 0) return SendClientMessage(playerid, red, "{FF0000}Error: {ffffff}This player is not wanted,you can't arrest him");
if(playerid == targetid) return SendClientMessage(playerid,red, "{FF0000}Error: {ffffff}You cannot arrest yourself.");
if(gTeam[playerid] == CLASS_COPS && gTeam[playerid] == CLASS_CIA && gTeam[playerid] == CLASS_SWAT && gTeam[playerid] == CLASS_ARMY) return SendClientMessage(playerid,red, "You can't arrest who is in your team.");
GetPlayerPos(playerid, targetidpos[0], targetidpos[1], targetidpos[2]);
if (!IsPlayerInRangeOfPoint(playerid, 5.0, targetidpos[0], targetidpos[1], targetidpos[2])) return SendClientMessage(playerid, -1, "Nobody close enough to arrest.");
GetPlayerName(playerid, pName, sizeof(pName));
GetPlayerName(targetid, tName, sizeof(tName));
if(IsPlayerConnected(targetid))
{
if(GetPlayerWantedLevel(targetid) == 4 & 100)
{
TimerArrest[targetid] = SetTimerEx("BeginArrestedTimer", 10000, false,"i", targetid); // 10 Secdons timer
BeginArrested[targetid] = 1;
SetPlayerSpecialAction(targetid, SPECIAL_ACTION_CUFFED);
ApplyAnimation(playerid, "ped", "ARRESTgun", 4.1, 0, 1, 1, 1, 1);
new ArrestReward = random(15000) + 2500;
if(ArrestReward > GetPlayerCash(playerid))
SetPlayerAttachedObject(targetid, 8, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000, 1.168000);
format(string, sizeof(string), "{0080FF}[BEING ARRESTED]: {FFFFFF}Law Enforcement Officer %s(%d) has put {ADFF2F}Handcuffs {FFFFFF}on you.", pName, playerid);
format(string, sizeof(string), "You have placed {0080FF}%s(%d) {FFFFFF}in Handcuffs for an Arrest. Use {0080FF}/search (id) {FFFFFF}to search Him for illegal Drugs.", tName, targetid);
SendClientMessage(targetid, -1, "{0080FF}[BEING ARRESTED]: {FFFFFF}Use {0080FF}/breakcuffs (/bc) {FFFFFF}to attempt to evade the Arrest.");
format(string, sizeof(string), "{ffffff}You have Arrested {FFD700}%s(%d){FFFFFF}. You have received {33FF33}$%d {FFFFFF}for this Arrest.", tName, targetid, ArrestReward);
SendClientMessage(playerid, red, string);
format(string, sizeof(string), "{0080FF}[ARRESTED]: {FFD700}%s(%d) {FFFFFF}has been {33CCFF}Arrested {FFFFFF}by {308AFF}Officer %s(%d){FFFFFF}!", tName, targetid, pName, playerid);
SendClientMessageToAll(yellow, string);
format(string, sizeof(string), "~w~You have ~G~Arrested ~Y~%s(%d)~n~n~You have received ~n~n~~y~$%d ~w~for this Arrest.", tName, targetid, ArrestReward);
GameTextForPlayer(playerid, string, 7000, 5);
GivePlayerMoney(playerid, ArrestReward);
SetPlayerScore(playerid, GetPlayerScore(playerid)+1);
SetPlayerScore(playerid, GetPlayerScore(targetid)-1);
SetPVarInt(playerid,"ArTime",GetTickCount()+5000);
}
}
return 1;
}
forward BeginArrestedTimer(targetid); public BeginArrestedTimer(targetid) { pJailTimerID[targetid] = SetTimerEx("pJailTimer", 1000, true, "i", targetid); pJailCount[targetid] = 80 + random(100); new Random = random(sizeof(RandomJailSpawns)); SetPlayerPos(targetid, RandomJailSpawns[Random][0], RandomJailSpawns[Random][1], RandomJailSpawns[Random][2]); SetPlayerFacingAngle(targetid, RandomJailSpawns[Random][2]); ResetPlayerWeapons(targetid); SetPlayerColor(targetid, COLOR_WHITE); SetPlayerInterior(targetid, 3); SetPlayerWantedLevel(targetid,0); return 1; }