Saving playerid's to new tutid; -
NeRoSiS - 05.04.2009
It's probably one of the most basic things in pwn, but I can't seem to figure it out, i'm not very good at searching either, a skill I really need to improve on, heck, I don't even know what it is I am searching for.
Under my login command I have this
I have a timer which /login sets off if you haven't done the tutorial(User files) the timer is like this
Код:
forward tutsteptime(playerid);
public tutsteptime(playerid)
{
SendClientMessage(tutid, AQUAGREEN, " ..:: Rules ::..");
}
All I need is so that tutid is saved per player, not for everyone, like a float I believe, as the tutorial is showing for my friend when he logs in as ID 0 then it's getting messed up when I log in, they sort of collide, it's very weird.
Anyway, I just need a way of tutid saving, because the playerid isn't functioning, it's only showing the messages for ID 0, thanks a lot guys.
Re: Saving playerid's to new tutid; -
[M2S]moe - 05.04.2009
Then you need to array tutid.
new tutid[MAX_PLAYERS];
which you would use like this: tutid[playerid] = playerid;
But I dont see why you even need this in the first place. just use playerid?
Re: Saving playerid's to new tutid; -
NeRoSiS - 05.04.2009
When I use playerid it only works for ID 0, I will test this idea immediately, thanks a lot.
EDIT: Can't test atm, my friend isnt on MSn, so I can't tell him to log into to get ID 0, as soon as he is I will test this.
Re: Saving playerid's to new tutid; -
NeRoSiS - 05.04.2009
Nope, doesn't work, ID 1 doesn't get the timer set for him.
Are timers set for the whole server? If so, is there a way of only setting them for players. Like if ID 1 has to do the tutorial he does, because if I am ID 1 roaming around and an ID 0 joins, I get the tutorial too.
Re: Saving playerid's to new tutid; -
NeRoSiS - 05.04.2009
Okay, I came up with an idea, searched around but nothing, a SetTimerForPlayer function, is there one? Or a way of making one?
Thanks
Re: Saving playerid's to new tutid; -
[M2S]moe - 05.04.2009
Yes, look at SetTimerEx in the wiki
Re: Saving playerid's to new tutid; -
introzen - 05.04.2009
SetTimerEx("TIMERNAME",Time,Repeatable,"u",playeri d);
Re: Saving playerid's to new tutid; -
gijsmin - 05.04.2009
Quote:
|
Originally Posted by IntrozeN
SetTimerEx("TIMERNAME",Time,Repeatable,"u",playeri d);
|
u? i think it is i
Re: Saving playerid's to new tutid; -
introzen - 05.04.2009
Quote:
|
Originally Posted by G...m..
Quote:
|
Originally Posted by IntrozeN
SetTimerEx("TIMERNAME",Time,Repeatable,"u",playeri d);
|
u? i think it is i
|
u = User
d/i = Number
Re: Saving playerid's to new tutid; -
dre$tA - 05.04.2009
Quote:
|
Originally Posted by IntrozeN
Quote:
|
Originally Posted by G...m..
Quote:
|
Originally Posted by IntrozeN
SetTimerEx("TIMERNAME",Time,Repeatable,"u",playeri d);
|
u? i think it is i
|
u = User
d/i = Number
|
No, u = User in sscanf. But in SetTimerEx i/d = integer & can be used as playerid. There is no "u" in SetTimerEx, so it's SetTimerEx(funcname[], interval, repeating, "i", playerid);