CMD:cuff(playerid, params[])
{
if(LoggedIn[playerid] == 0) return SendClientMessage(playerid, COLOUR_GREY, "You must be logged in to use this command.");
new giveplayerid, string[128];
if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOUR_GREY, "Usage: /cuff [player id or name]");
if(Faction[playerid] != 1) return SendClientMessage(playerid, COLOUR_GREY, "You are not a member of the police.");
if(!IsPlayerNearPlayer(playerid, giveplayerid, 3.0))return SendClientMessage(playerid, COLOUR_GREY, "You must be close to the player to cuff them.");
{
ApplyAnimation(giveplayerid, "PED", "cower", 1, 1, 0, 0, 0, 0, 1);
TogglePlayerControllable(giveplayerid, 0);
format(string, sizeof(string), "Officer %s has placed handcuffs on %s", GetNameEx(playerid), GetNameEx(giveplayerid));
ProxDetector(30.0, playerid, string, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE);
}
return 1;
}
CMD:cuff(playerid, params[])
{
if(LoggedIn[playerid] == 0) return SendClientMessage(playerid, COLOUR_GREY, "You must be logged in to use this command.");
new giveplayerid, string[128];
if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOUR_GREY, "Usage: /cuff [player id or name]");
if(Faction[playerid] != 1) return SendClientMessage(playerid, COLOUR_GREY, "You are not a member of the police.");
if(!IsPlayerNearPlayer(playerid, giveplayerid, 3.0))return SendClientMessage(playerid, COLOUR_GREY, "You must be close to the player to cuff them.");
{
TogglePlayerControllable(giveplayerid, 0);
ClearAnimations(giveplayerid);
ApplyAnimation(giveplayerid, "PED", "cower", 1, 1, 0, 0, 0, 0, 1);
format(string, sizeof(string), "Officer %s has placed handcuffs on %s", GetNameEx(playerid), GetNameEx(giveplayerid));
ProxDetector(30.0, playerid, string, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE);
}
return 1;
}
Under IsPlayerNearPlayer remove the brace { and at the end up of return 1; remove the brace }
Just do that four functions without declaring it in IsPlayerNearPlayer. |
Probably: =WoR=G4M3Ov3r is right. Since I had the same problem while I didn't have those { and }
|
CMD:cuff(playerid, params[]) { if(LoggedIn[playerid] == 0) return SendClientMessage(playerid, COLOUR_GREY, "You must be logged in to use this command."); new giveplayerid, string[128]; if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOUR_GREY, "Usage: /cuff [player id or name]"); if(Faction[playerid] != 1) return SendClientMessage(playerid, COLOUR_GREY, "You are not a member of the police."); if(!IsPlayerNearPlayer(playerid, giveplayerid, 3.0)) return SendClientMessage(playerid, COLOUR_GREY, "You must be close to the player to cuff them."); ApplyAnimation(giveplayerid, "PED", "cower", 1, 1, 0, 0, 0, 0, 1); TogglePlayerControllable(giveplayerid, 0); format(string, sizeof(string), "Officer %s has placed handcuffs on %s", GetNameEx(playerid), GetNameEx(giveplayerid)); ProxDetector(30.0, playerid, string, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE); return 1; }
if(!IsPlayerNearPlayer(playerid, giveplayerid, 3.0))
stock PreloadAnimLib(playerid, animlib[])
ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);
PreloadAnimLib(playerid, "PED");
PreloadAnimLib(playerid,"BOMBER");
PreloadAnimLib(playerid,"RAPPING");
PreloadAnimLib(playerid,"SHOP");
PreloadAnimLib(playerid,"BEACH");
PreloadAnimLib(playerid,"SMOKING");
PreloadAnimLib(playerid,"FOOD");
PreloadAnimLib(playerid,"ON_LOOKERS");
PreloadAnimLib(playerid,"DEALER");
PreloadAnimLib(playerid,"CRACK");
PreloadAnimLib(playerid,"CARRY");
PreloadAnimLib(playerid,"COP_AMBIENT");
PreloadAnimLib(playerid,"PARK");
PreloadAnimLib(playerid,"INT_HOUSE");
PreloadAnimLib(playerid,"FOOD" );
PreloadAnimLib(playerid,"PED" );
Missed anything?
All of them:
pawn Code:
|
PreloadAnimLib(playerid, animlib[])
{
ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);
}
And of course not forgetting:
pawn Code:
|