04.01.2013, 06:35
Quote:
Sorry for posting twice but could you please make me a zcmd or another fomat like dcmd command?
I want it to be like a spawning guns. For example /getgun minigun , /getgun ak 47 |
Proper usage: /givegun PlayerID GunID Ammo - (Minigun is "38")
pawn Code:
CMD:givegun(playerid,params[])
{
new PID; //Player ID
new GunID; //Gun ID
new Ammo; //Ammo #
if(PlayerInfo[playerid][pAdmin] <= 3) return SendClientMessage(playerid,-1,"{FF0000}__**ERROR**__ {FFFFFF}You cannot use this command");// Admins below level 3 will not be able to use this command.
if(sscanf(params, "ui", PID, GUNID, Ammo)) return SendClientMessage(playerid,-1,"{FF0000}__**ERROR**__ {FFFFFF}Usage: /givegun <playerid> <gunid> <ammo>");
if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, -1,"{FF0000}__**ERROR**__ {FFFFFF}That player is not connected to the server!");
GivePlayerWeapon(PID, GunID, Ammo); //Command to give weapons.
return 1;
}