02.02.2011, 15:49
Sure :]
pawn Код:
dcmd_parole(playerid, params[])
{
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: /parole (id)");
else if(gTeam[playerid] != TEAM_COP || gTeam[playerid] != TEAM_AIRCOP || gTeam[playerid] != TEAM_MARINECOP || gTeam[playerid] != TEAM_SWAT || gTeam[playerid] != TEAM_ARMY) return SendClientMessage(playerid, COLOR_ERROR, "Only Law Enforcement can use this command");
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(Alcatraz[targetid] == 1)
{
format(string, sizeof(string), "%s(%d) is on alcatraz. You cannot parole that player", targetname, targetid);
SendClientMessage(playerid, COLOR_ERROR, string);
}
else if(Jailed[targetid] == 0)
{
format(string, sizeof(string), "%s(%d) is not in jail",targetname, targetid);
SendClientMessage(playerid, COLOR_ERROR, string);
return 1;
}
else
{
//sends the shit
//info
//ect
return 1;
}
return 1;
}