SA-MP Forums Archive
Help OnPlayerSpawn. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help OnPlayerSpawn. (/showthread.php?tid=318227)



Help OnPlayerSpawn. - ricardo178 - 14.02.2012

Hello. Well, this happen in my Old GameMode after 0.3d and now, on my scratch made GameMode that i am making to gain more experience.

After pressing Spawn button, this happens:


The code:
pawn Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerPos(playerid, 10.0, 10.0, 10.0);
    return 1;
}
Thank you.


Re: Help OnPlayerSpawn. - RicaNiel - 14.02.2012

try adding

pawn Код:
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
i have encounter such problems


AW: Help OnPlayerSpawn. - Dripac - 14.02.2012

Are you spawning somewhere outside of san andreas?


Re: Help OnPlayerSpawn. - RicaNiel - 14.02.2012

Quote:

Are you spawning somewhere outside of san andreas?

i think it doesn't matter but what matters the most is that you add

pawn Код:
AddPlayerClass



Re : Re: Help OnPlayerSpawn. - ricardo178 - 14.02.2012

Quote:
Originally Posted by RicaNiel
Посмотреть сообщение
try adding

pawn Код:
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
i have encounter such problems
Will try.

Quote:

Are you spawning somewhere outside of san andreas?

This cords are in Bluebery Acres. The place you spawn when no cords.. Just made it not spawn undersground.


EDIT:
Didn't work.


Re: Help OnPlayerSpawn. - Dr.Heinz - 14.02.2012

did you make sure that AddPlayerClass was there? otherwise it would be like this.


Re: Help OnPlayerSpawn. - RicaNiel - 14.02.2012

did it work?


Re : Re: Help OnPlayerSpawn. - ricardo178 - 14.02.2012

Quote:
Originally Posted by Dr.Heinz
Посмотреть сообщение
did you make sure that AddPlayerClass was there? otherwise it would be like this.
Now i have this, and still the same...

pawn Код:
public OnPlayerSpawn(playerid)
{
    return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
}



Re: Help OnPlayerSpawn. - RicaNiel - 14.02.2012

Quote:

Now i have this, and still the same...

are you going to add
the add selection class or not?
if not then leave the "OnPlayerRequestClass" blank

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    // leave it blank here
    return 1;
}



Re : Re: Help OnPlayerSpawn. - ricardo178 - 14.02.2012

Quote:
Originally Posted by RicaNiel
Посмотреть сообщение
are you going to add
the add selection class or not?
if not then leave the "OnPlayerRequestClass" blank

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    // leave it blank here
    return 1;
}
No, i will not add it.
I tried deleteing it and let only OnPlayerSpawn, i tried letting both, deleting OnPlayerSpawn, leaving them blank.. Nothing work......