21.04.2013, 14:48
How do i can make a script
/gun id gives your the gun with 500 ammo i searched on web but i didnt find.
/gun id gives your the gun with 500 ammo i searched on web but i didnt find.
GivePlayerWeapon(playerid, weapid, 500)
CMD:givegun(playerid, params[]) { new gID, weap, ammo; if(PlayerInfo[playerid][pOnDuty] < 1) return 0; if(PlayerInfo[playerid][pAdminLevel] < 2) return 0; SendClientMessage(playerid, 8, "USAGE:/givegun [id/name] [ammo]"); if(!IsPlayerConnected(gID)) return SendClientMessage(playerid, COLOR_RED, "This player is not connected"); if(weap == 0 && 0 && 0) return SendClientMessage(playerid,COLOR_RED,"ERROR: Invalid weapon ID"); GivePlayerWeapon(gID,weap,ammo); return 1; }
COMMAND:gun(playerid, params[]) { return 1; }
COMMAND:gun(playerid, params[]) { new gunid; if(sscanf(params, "i", gunid)) { SendClientMessage(playerid, 0xFFFFFF, "/gun (gunid)"); } return 1; }
COMMAND:gun(playerid, params[]) { new gunid; if(sscanf(params, "i", gunid)) { SendClientMessage(playerid, 0xFFFFFF, "/gun (gunid)"); } else { GivePlayerWeapon(playerid, gunid, 500); } return 1; }
CMD:gun(playerid, params[])
{
GivePlayerWeapon(playerid, weaponID, Amount);
return 1;
}
COMMAND:gun(playerid, params[]) { if(PlayerInfo[playerid][pOnDuty] < 1) return 0; if(PlayerInfo[playerid][pAdminLevel] < 2) return 0; new gunid; if(sscanf(params, "i", gunid)) { SendClientMessage(playerid, 0xFFFFFF, "/gun (gun-id)"); } else { GivePlayerWeapon(playerid, gunid, 100000); } return 1; }
Код:
COMMAND:gun(playerid, params[]) { if(PlayerInfo[playerid][pOnDuty] < 1) return 0; if(PlayerInfo[playerid][pAdminLevel] < 2) return 0; new gunid; if(sscanf(params, "i", gunid)) { SendClientMessage(playerid, 0xFFFFFF, "/gun (gun-id)"); } else { GivePlayerWeapon(playerid, gunid, 100000); } return 1; } melee weapons sword knuckle etc. |
pawn Код:
If you are using weapons that has the same slot you will only receive one of them. https://sampwiki.blast.hk/wiki/Weapons |