Whats wrong?
#8

Here goes....
pawn Код:
new uses[MAX_PLAYERS];
CMD:explode(playerid, params[])
{
    if(PlayerInfo[playerid][Padmin] < 2) return SendClientMessage(playerid,-1,#level not enought);
    if(uses[playerid] > 3) return SendClientMessage(playerid,-1,#max usage is 4 times, you can't use it again);
    if(GetPVarInt(playerid,#countdown) > gettime()) return SendClientMessage(playerid,-1,#you must wait 30 seconds before use it again);
    new id, string[128],Float:X, Float:Y, Float:Z;
    if(sscanf(params,"u",id)) return SendClientMessage(playerid, COLOR_GREEN, "USAGE: /explode <id>");
    if(id == playerid) return SendClientMessage(playerid, COLOR_RED, "You cannot use this command on yourself.");
    if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "This player is not connected");
    GetPlayerPos(id, X, Y, Z);
    CreateExplosion(X, Y, Z, 0, 5);
    format(string, sizeof(string), "You have been blown up by %s", PlayerName(playerid));
    SendClientMessage(playerid, COLOR_GREEN, string);
    format(string, sizeof(string), "You have blown up %s", PlayerName(id));
    SendClientMessage(id, COLOR_RED, string);
    SetPVarInt(playerid,#countdown,gettime() + 30);
    uses[playerid]++;
    return 1;
}
Reply


Messages In This Thread
Whats wrong? - by thefatshizms - 11.08.2012, 15:37
Re: Whats wrong? - by Djole1337 - 11.08.2012, 15:42
Re: Whats wrong? - by thefatshizms - 11.08.2012, 15:49
Re: Whats wrong? - by Djole1337 - 11.08.2012, 15:53
Re: Whats wrong? - by thefatshizms - 11.08.2012, 15:56
Re: Whats wrong? - by thefatshizms - 11.08.2012, 15:58
Re: Whats wrong? - by thefatshizms - 11.08.2012, 18:47
Re: Whats wrong? - by leonardo1434 - 11.08.2012, 19:03

Forum Jump:


Users browsing this thread: 2 Guest(s)