22.08.2013, 17:24
(
Last edited by efrim123; 24/08/2013 at 11:06 AM.
)
include zcmd first
and ofc define the color thx for Bravo for reminding me
Hope it helped you guys have a nice day
pawn Code:
#include <zcmd>
pawn Code:
#define COLOR_RED 0xFF0000
pawn Code:
CMD:wpack(playerid, params[]) // this how you need to preform the command
{
if(GetPlayerMoney(playerid) < 1000)
return SendClientMessage(playerid, COLOR_RED, "You don't have enough cash to buy /wpack");
GivePlayerMoney(playerid, -1000); //this takes the money from the player so it wont be free
GivePlayerWeapon(playerid, 10, 0); //You can change the weapons if you want
GivePlayerWeapon(playerid, 24, 500); //those functions are the weapons
GivePlayerWeapon(playerid, 26, 500);
GivePlayerWeapon(playerid, 32, 500);
GivePlayerWeapon(playerid, 31, 500);
GivePlayerWeapon(playerid, 34, 500);
SendClientMessage(playerid, COLOR_RED, "You have succesfully used /wpack!"); //this shows that the cmd works
return 1;
}