29.10.2014, 04:19
Hello everyone!
I have a little errors here and i have no idea what's wrong.
Here is my command btw i want to do it to all of my commands.. (I mean only /rape /arrest /cuff)
Line
Define
Command
I have a little errors here and i have no idea what's wrong.
Here is my command btw i want to do it to all of my commands.. (I mean only /rape /arrest /cuff)
Line
PHP код:
if(!IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_RED, "[ERROR]: You must be spawned to use that command");
PHP код:
new IsPlayerSpawned[MAX_PLAYERS];
PHP код:
CMD:rape(playerid,params[])
{
if(IsPlayerPolice[playerid] != 0) return SendClientMessage(playerid,-1,"{ff0000}Cops are not allowed to rape.");
new targetid, Float:x, Float:y, Float:z;
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, "USAGE: /rape [Part of name/Player ID]");
if(playerid == targetid) return SendClientMessage(playerid, -1, "{FF0000}[ERROR]: You can't rape yourself");
if(!IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_RED, "[ERROR]: You must be spawned to use that command");// This line <<
if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFFFFFFF,"{ff0000}[ERROR]: This player is not connected!");
GetPlayerPos(playerid,x,y,z);
if(IsPlayerInRangeOfPoint(targetid, 5.0, x,y,z))
{
new str[512];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name,sizeof(name));
new target[MAX_PLAYER_NAME];
GetPlayerName(targetid, target,sizeof(target));
format(str, sizeof(str), "{ff0000}You have raped %s",target);
SendClientMessage(playerid, 0xE01B1B, str);
ApplyAnimation(playerid, "MISC", "BITCH_SLAP", 0,0,0,0,0,0,0);
}
return 1;
}