29.03.2014, 20:05
Hi!
I tired out the Random function for fun, for learning more Pawn.
Anyway: Pawno just crashing..
Her's the code:
Btw first time I test this function.
I tired out the Random function for fun, for learning more Pawn.
Anyway: Pawno just crashing..
Her's the code:
pawn Код:
#define FILTERSCRIPT
#include <a_samp>
#if defined FILTERSCRIPT
#define blue 0x6709E3FF
#define green 0x0CCC19FF
#define black 0x0A0A0AFF
#define turquoise 0x6DD9F7FF
public OnFilterScriptInit()
{
return 1;
}
#else
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/rand", cmdtext, true, 10) == 0)
{
new rand = random(sizeof(random));
return 1;
}
return 0;
}
new random [] [] =
{
SendClientMessage(playerid, blue, "Blue";
SendClientMessage(playerid, green, "Green";
SendClientMessage(playerid, black, "Black";
SendClientMessage(playerid, turquoise, "Tturquoise"
GivePlayerCash(playerid, 5000);
}