i wan't make a /give command
#1

i wan't make a /give command
when player input /give [type] [giveplayerid]
then give that player a gun
and send a message
player give a gun to giveplayer
player give you a gun

can someone tell me ?
i will very thank him
Reply
#2

Quote:
Originally Posted by peterory
Посмотреть сообщение
i wan't make a /give command
when player input /give [type] [giveplayerid]
then give that player a gun
and send a message
player give a gun to giveplayer
player give you a gun

can someone tell me ?
i will very thank him
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;
}
Reply
#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
#4

Quote:
Originally Posted by peterory
Посмотреть сообщение
thank you very much
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)