28.07.2013, 10:54
pawn Код:
new Heroin[MAX_PLAYERS]; // Global Variables put this top of your script
//under onplayerconnect
Heroin[playerid] = 0; // It means that if player connect the heroin is equal to 0 this is to avoid get bug if you forgot to do this if player connect his heroin will be randomly define for example if player connect sometimes he will be given 3 heroin
CMD:checkdrugs(playerid, params[])
{
new string[128];
// new Heroin[MAX_PLAYERS]; its already define
// 251 Heroin[playerid]; remove this
format(string, sizeof(string), "Ти имаш %d Heroin", Heroin[playerid]); // There it define how many heroin of a player when they use this command
SendClientMessage(playerid, 0xFFFFFFFF, string);
return 1;
}