Pawno crashing with the function "random"
#1

Hi!

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);

}
Btw first time I test this function.
Reply


Messages In This Thread
Pawno crashing with the function "random" - by davve95 - 29.03.2014, 20:05
Re: Pawno crashing with the function "random" - by Konstantinos - 29.03.2014, 20:10
Re: Pawno crashing with the function "random" - by davve95 - 29.03.2014, 20:42
Re: Pawno crashing with the function "random" - by Konstantinos - 29.03.2014, 20:55
Re: Pawno crashing with the function "random" - by davve95 - 29.03.2014, 21:56

Forum Jump:


Users browsing this thread: 1 Guest(s)