Can't make the command work.
#4

Quote:
Originally Posted by [L3th4l]
Посмотреть сообщение
You already posted that same topic >.<

pawn Код:
CMD:gw(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF4646FF, "You are not authorized to use that command !");

    new pID, wID, Ammo, pName[MAX_PLAYER_NAME], GivenName[MAX_PLAYER_NAME];
    if(sscanf(params, "rii", pID, wID, Ammo)) return SendClientMessage(playerid, COLOR_RED, "* Usage: /GW < PlayerID > < WeaponID > < Ammo >");
    if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_RED, "* That user is not online!");
    GivePlayerWeapon(pID, wID, Ammo);
    new Str[128];
    GetPlayerName(playerid, pName, sizeof(pName));
    GetPlayerName(pID, GivenName, sizeof(GivenName));
    format(Str, sizeof(Str), "Admin %s has given %s weapon id %d with %d rounds of ammo.", pName, GivenName, wID, Ammo);
    SendClientMessage(playerid, COLOR_GREEN, Str);
    return 1;
}
It works, but It doesn't show the name of the weapon .
can you help me with that ?
Reply


Messages In This Thread
Can't make the command work. - by Scriptissue - 02.10.2010, 18:57
Re: Can't make the command work. - by [L3th4l] - 02.10.2010, 19:07
Re: Can't make the command work. - by New_Player[USW] - 02.10.2010, 19:09
Re: Can't make the command work. - by Scriptissue - 02.10.2010, 19:15
Re: Can't make the command work. - by [L3th4l] - 02.10.2010, 19:18
Re: Can't make the command work. - by Scriptissue - 02.10.2010, 19:38

Forum Jump:


Users browsing this thread: 1 Guest(s)