Quote:
Originally Posted by Weirdosport
pawn Код:
#include <a_samp>
//############################# //## Change these: ## //#############################
#define GUNID 27 #define GUNCOST 1000 #define AMMO 500 #define COLOR 0xFF00FFFF
//#############################
new String[128];
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/buyspaz", cmdtext, true, 10) == 0) { if(GetPlayerMoney(playerid) >= GUNCOST) { GivePlayerWeapon(playerid, GUNID, AMMO); SendClientMessage(playerid, COLOR, "Enjoy your spaz!"); } else { format(String, sizeof(String), "You need at least %d to buy a Spaz!", GUNCOST); SendClientMessage(playerid, COLOR, String); } return 1; } return 0; }
|
Wow, another reply within 10 minutes, hehe
Is there a point in defining the numbers the top, since you could put them in the script it self?
For example #define GUNID 27
Couldn't you just type in 27 for the gunID, instead of defining it, just makes more sence to me.