10.02.2012, 22:53
try
pawn Код:
CMD:rape(playerid, params[])
{
new id;
if(gTeam[playerid] == TEAM_COP) return SendClientMessage(playerid, red, "Cops can't rape other players!");
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,red,"You can't rape a player if you are in a vehicle!");
if(IsSpawned[playerid] == 0) return SendClientMessage(playerid,0xFF0000FF,"You can't use this command when you are dead or spawning.");
if(GetPVarInt(playerid,"RapeTime")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"Please wait 10 seconds before rape again.");
if (GetDistanceBetweenPlayers(playerid,id)>2) return SendClientMessage(playerid, red, "You are NOT near something to attempt to rape");
if(GetDistanceBetweenPlayers(playerid,id)<2)
{
SendClientMessage(playerid, COLOR_WHITE, "Raped player.");
SetPVarInt(playerid,"RapeTime",GetTickCount()+10000);
}
return 1;
}