05.03.2011, 20:01
pawn Код:
dcmd_rape(playerid, params[])
{
if(gTeam[playerid] == TEAM_RAPTIST)
{
new targetid, string[128];
new playername[MAX_PLAYER_NAME], targetname[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
GetPlayerName(targetid, targetname, sizeof(targetname));
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_USAGE, "USAGE: /rape (id)");
else if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_ERROR, "Invalid ID");
else if(IsSpawned[playerid] == 0) return SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
else if(Jailed[playerid] == 1) return SendClientMessage(playerid, COLOR_ERROR, "You cannot use this command in jail");
else if(targetid == playerid) return SendClientMessage(playerid, COLOR_ERROR, "You cannot rape yourself");
else if(GetDistanceBetweenPlayers(playerid, targetid) > 3)
{
format(string, sizeof(string), "%s(%d) Is not close enough to get raped", targetname, targetid);
SendClientMessage(playerid, COLOR_ERROR, string);
return 1;
}
else
{
format(string, sizeof(string), "%s(%d) has raped you", playername, playerid);
SendClientMessage(targetid, COLOR_GREEN, string);
format(string, sizeof(string), "You raped %s(%d)", targetname, targetid);
SendClientMessage(playerid, COLOR_GREEN, string);
format(string, sizeof(string), "%s(%d) has raped %s(%d)", playername, playerid, targetname, targetid);
printf("%s", string);
AIDS[targetid] = 1;
return 1;
}
}
return 0;
}
My Name: Unknown123
My Brothers name: Abc123
I raped my brother (Ingame)
This got printed in my Log
Код:
[21:40:33] Unknown123(0) has raped Unknown123(1)