Class Selection problem -.-
#1

I tried to AddPlayerClass in main() or OnGameModeInit and many other places..I set the right positions and weapons , skin etc..
But the player never seens to show in the class selection , so i cant spawn..

Can someone makes me a simple code to add skin 118 with weapons : 4,1 && 24,200
Please any locations, I just want it to work.
Reply
#2

Your problem is the cameras not being set.



Replace OnPlayerRequestClass with this.


pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerInterior(playerid,14);
    SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
    SetPlayerFacingAngle(playerid, 270.0);
    SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
    SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
    return 1;
}
Problem fixed
Reply
#3

hmm and i can add classes with any location ? dont need to be the same as that one ?
Reply
#4

That becomes harder scripting. Learn the basics, then you will learn the more "advanced stuff"
Reply
#5

I know C++ but im new to samp stuff :S
Reply
#6

Now i got another problem, only CJ shows up, and i cant spawn him...(And i didn added CJ , i added id 118 )
Reply
#7

Where did you add it?
Reply
#8

Show your
Код:
public OnGameModeInit()
and your
Код:
public OnPlayerRequestClass(playerid, classid)
Reply
#9

public OnPlayerRequestClass(playerid, classid)
{
SetPlayerInterior(playerid,14);
SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
SetPlayerFacingAngle(playerid, 270.0);
SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
return 1;
}

public OnGameModeInit(){
SetGameModeText("Fun OverDose!");
AddPlayerClass(118,835.938354, -2039.453613, 12.867187,180.468139,4,1,24,200,0,0);
}

Only CJ shows up.
Reply
#10

Just a suggestion but you can change where players spawn inside any callback with this function.
https://sampwiki.blast.hk/wiki/SetSpawnInfo
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)