Alittle help scripting something quite advanced... PLEASE!
#1

Hey guys!
Im scripting something unique so i wont get in big details
Basicly, I dont know how to script something so please help me

What I want it to do:
When a player logs-in, there is a variable defined to his slot. By default, it's value is 0. If he types "/blogin [blogin password]", it will set the variable to 1.
Please, help me!
Reply
#2

Search the forums for a user/admin system, and just add the variable setting thing to the login command...

It'd probably help if you knew how to script, but in essence here is what you need:

Globally:
pawn Код:
new VariableName[MAX_PLAYERS];
In Login Command:
pawn Код:
VariableName[playerid] = 1;
Reply
#3

Waiting for a helping reply
Dude I dont know how to use variables in PAWN... Thats the whole problem!
Reply
#4

He just told you. You pretty much explained how when you were asking. If you can't understand from that, look at the wiki, examples included in the server package, and the pawn language pdf.
Reply
#5

Quote:

Alittle help scripting something quite advanced

Frankly, this is piss easy stuff, it's only a step up from the bog standard stuff I'd teach total beginners.. As Previous Poster says, you should look on the wiki, or at some tutorials or something..

And if you don't know how to use variables in pawn, it doesn't leave much..
Reply
#6

Hmmm... I guess I wont need scripting a whole register / login system! :P
Tyvm guys I will test those 2 now.
Reply
#7

Thanks guys, i am scripting it right now.
But by the way, I thought and I'd need some help... How can I make Pawno create an .ini and store the variable ammount in it?
( Btw i called this advanced because some medium-leveled scripter that i asked couldnt do it. )
Reply
#8

Must not be very medium level.

There's a native called fWrite, look at that and figure it out from there
Reply
#9

If you're a beginner you'd be best off using Dini as opposed to fwrite. (Dini does the more complicated fwrite bits for you).

If you just search for Dini I can guarantee it will be there, by "Draco Blue"
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)