HELP!! Weird but big bug
#1

Okay

Код:
forward aspawn(playerid);
public OnPlayerSpawn(playerid)
{
	if (AccountInfo[playerid][AdminLevel] >= 1 || IsPlayerAdmin(playerid))
		{
			SetTimer("aspawn",2000,false);
		}
	else SendClientMessage(playerid, RED, "Info: Regulary spawned");
	return 1;
}
Then below it:
Код:
public aspawn(playerid)
{
	SetPlayerPos(playerid,-911.0206,2686.2388,42.3703,42.9066);
	SendClientMessage(playerid, RED, "Info: Spawned as admin");
}
But holy hell, everytime ID 0 gets TPed to the admin HQ D: Why?
Reply
#2

Change:
pawn Код:
SetTimer("aspawn",2000,false);
to:
pawn Код:
SetTimerEx("aspawn",2000,false,"i",playerid);
Reply
#3

Good, now it works, but you still dont get setted to the position Iґve written. Why?
Reply
#4

Quote:
Originally Posted by Mo3
Good, now it works, but you still dont get setted to the position Iґve written. Why?
You said it's working but now you say it's not setting you to the position? Mean's it's not working..

Are you admin when you're spawning?
Reply
#5

The timer only gets activated when spawning as admin.. so.. yeah.

I mean, you get the message, but dont get setted to the pos.
Reply
#6

Quote:

SetPlayerPos(playerid, -911.0206, 2686.2388, 42.3703, 42.9066)
SetPlayerPos(playerid, Float, Float:y, Float:z)

Remove the extra param !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)