basics

Started by [VSS]Shawn, Jul 10, 2015, 11:32 AM

Previous topic - Next topic

[VSS]Shawn

well i have added this on my binfo
registered = false;
logged = false;

and add this on pickuppickup

if ( binfo[ player.ID ].logged == false ) msg

but when i pickup the pickup it say in console error index registered or logged does not exist why?

.

What dafuq do you have in your eyes? Poop? When you pressed that NEW TOPIC button. Did you bother to look at what's below that button?
.

[VSS]Shawn

so your mean i have to add sqlite04rel32 in server.cfg?

jayant

No, he means,that you should check everything in your script that it actually exist or not..Maybe you will now understand what he & I meant to say..

class PlayerStats
{
 logged = false;
 registered = false;
 cash = 0;// u can add this
 level = 0;// u can add this, etc.
}

function onScriptLoad()
{
binfo <- array( GetMaxPlayers(), null );
}

function onPlayerJoin( player )
{
binfo[player.ID] = PlayerStats(); //Getting the things from class we have created
}
Now, with binfo array you can use your class anywhere in the script,in your own function, in any event with proper parameters..

> I am not good in explaning things.But it may help you.

[VSS]Shawn


jayant

I only gave you an example of doing these things...The rest is upto you and your coding style.