Can't make the command work.
#5

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], WeapName[20];
    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));
    GetWeaponName(wID, WeapName, sizeof(WeapName));
    format(Str, sizeof(Str), "Admin %s has given %s weapon %s id %d with %d rounds of ammo.", pName, GivenName, WeapName, wID, Ammo);
    SendClientMessage(playerid, COLOR_GREEN, Str);
    return 1;
}
Should work.
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)