i wan't make a /give command
#3

Quote:
Originally Posted by CidadeNovaRP
Посмотреть сообщение
pawn Код:
CMD:giveweapon(playerid, params[])
{
    new id, weapon, ammo, string[128];
    if(sscanf(params, "ud", id, weapon)) return SendClientMessage(playerid, COR_ERRO, "USEAGE: /giveweapon [ID] [WEAPONID]");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COR_ERRO, "Player isn't online.");
    if(playerid == id) return SendClientMessage(playerid, COR_ERRO, "You don't give weapon for you.");
    GivePlayerWeapon(id, weapon, ammo);
    format(string, sizeof(string), "The player %s give you the weapon id %d, %d ammo.", GetName(playerid), arma, municao);
    SendClientMessage(id, -1, string);
    format(string, sizeof(string), "You give a %s the weapon id %d, %d ammo.", GetName(id), arma, municao);
    SendClientMessage(playerid, -1, string);
    return 1;
}
thank you very much
Reply


Messages In This Thread
i wan't make a /give command - by peterory - 15.06.2012, 14:13
Respuesta: i wan't make a /give command - by CidadeNovaRP - 15.06.2012, 14:19
Re: Respuesta: i wan't make a /give command - by peterory - 15.06.2012, 14:50
Respuesta: Re: Respuesta: i wan't make a /give command - by CidadeNovaRP - 15.06.2012, 14:55

Forum Jump:


Users browsing this thread: 1 Guest(s)