[HELP] Script.
#10

Quote:
Originally Posted by Nicholas.
Посмотреть сообщение
Ah thank you. I found my problem.

Rep'ed.
I would recommend you modify it a little bit if you're going to use OnPlayerSpawn, something like....


pawn Код:
new bool:FirstSpawn[MAX_PLAYERS]; //This would be outside of everything

/*
    Inside of the registration code, add FirstSpawn[playerid] = true;
    Inside of OnPlayerConnect i would also add FirstSpawn[playerid] = false;
    This way when they register, it's going to be true, when they are already registered,
    it won't be true
*/


public OnPlayerSpawn(playerid)
{
    if(FirstSpawn[playerid] == true) SetTimerEx("RegisterCash", 60000, false, "i", playerid); //Sets a timer for "Register Cash" at 1 minute and does not repeat itself and stores their playerid.
    return 1;
}

forward RegisterCash(playerid);

public RegisterCash(playerid)
{
    GivePlayerMoney(playerid, 100);
    FirstSpawn[playerid] = false; //EDIT: forgot this lol
    return SendClientMessage(playerid, -1, "{FFFFFF}You have been given $100 as a gift!");
}
Reply


Messages In This Thread
[HELP] Script. - by Nicholas. - 12.02.2012, 21:20
Re: [HELP] Script. - by Steven82 - 12.02.2012, 21:52
Re: [HELP] Script. - by 2KY - 12.02.2012, 21:54
Re: [HELP] Script. - by Madd Kat - 12.02.2012, 22:03
Re: [HELP] Script. - by Nicholas. - 12.02.2012, 22:33
Re: [HELP] Script. - by Nicholas. - 12.02.2012, 23:12
Re: [HELP] Script. - by [ABK]Antonio - 12.02.2012, 23:16
Re: [HELP] Script. - by Steven82 - 12.02.2012, 23:17
Re: [HELP] Script. - by Nicholas. - 12.02.2012, 23:26
Re: [HELP] Script. - by [ABK]Antonio - 12.02.2012, 23:34

Forum Jump:


Users browsing this thread: 4 Guest(s)