14.07.2010, 03:23
(
Последний раз редактировалось Kar; 14.07.2010 в 04:17.
)
these just return the Usage?
pawn Код:
CMD:bribe(playerid, params[])
{
new ammount,
giveplayerid;
if (!sscanf(params, "dd", giveplayerid, ammount)) SendClientMessage(playerid, 0xFF0000FF, "[INFO] Usage: /bribe [ID] [AMMOUNT]");
else if (!IsPlayerConnected(giveplayerid)) SendClientMessage(playerid, 0xFF0000FF, "[INFO] Invalid ID");
else if (GetPlayerWantedLevel(playerid) == 0) SendClientMessage(playerid, 0xFF0000FF, "[INFO] Your not wanted");
else if (BribeTo[playerid]!=999) SendClientMessage(playerid, 0xFF0000FF, "[INFO] You are aldery bribing. Do /bribecancel for cancel.");
else if (ammount < 1000) SendClientMessage(playerid, 0xFF0000FF, "[INFO] Your Bribe Must Be Larger (1000+).");
else if (ammount > GetPlayerMoney(playerid)) SendClientMessage(playerid, 0xFF0000FF, "[INFO] Dont have that much to bribe with.");
else if (BribeFrom[giveplayerid] != 999) SendClientMessage(playerid, 0xFF0000FF, "[INFO] That cop is being bribed right now.");
else
{
BribeTo[playerid] = giveplayerid;
BribeFrom[giveplayerid] = playerid;
Bribe[giveplayerid] = ammount;
new bname[256];
new tmp[256];
GetPlayerName(playerid, bname, sizeof(bname));
format(tmp,256,"[INFO] %s offered you a bribe of $%s",bname, ammount);
SendClientMessage(giveplayerid, COLOR_YELLOW, tmp);
SendClientMessage(giveplayerid, COLOR_YELLOW, "[INFO] Do /accept to accept or /decline to decline and report");
SendClientMessage(playerid, COLOR_GREEN, "[INFO] Bribe offered. Do /cbribe or wait for an response");
}
return 1;
}
CMD:suspect(playerid, params[])
{
if(gTeam[playerid] == TEAM_COPS)
{
new giveplayerid, string[256];
if (!sscanf(params, "ds", giveplayerid, string)) SendClientMessage(playerid, 0xFF0000FF, "[INFO] Usage: /suspect [ID] [REASON]");
else if (!IsPlayerConnected(giveplayerid)) SendClientMessage(playerid, 0xFF0000FF, "[INFO] Invalid ID");
else if (GetPlayerWantedLevel(giveplayerid)) SendClientMessage(playerid, 0xFF0000FF, "[INFO] Suspect is already wanted.");
else
{
format(pfile, sizeof(pfile), pfile_path, Playername(playerid));
WantedLevel(giveplayerid,"+1",string);
new tmp[256];
format(tmp,256,"[INFO] You got reported for %s by %s",string,Playername(playerid));
SendClientMessage(giveplayerid, COLOR_RED, tmp);
SendClientMessage(giveplayerid, COLOR_RED, "[INFO] If you think that it's wrong, please contact /911, thanks");
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "[INFO] You must be a cop for use this command!");
}
return 1;
}