Problem with spawn
#1

Hello guys,first of all I would like to apologise for my bad English.

I try to make my gamemod starter at zero,and I want to add this : https://sampforum.blast.hk/showthread.php?tid=282178 .I all do like in this tutorial ,but when I join to my server i register&login and then cant choose skin with arrow on keybord ,only can with mouse and then click to arrow ,when I choose i click to spawn ,but nothing happen..Cant spawn.Please help
Reply
#2

Use AddPlayerClass in the OnGameModeInit callback.

Quote:

This forum requires that you wait 120 seconds between posts. Please try again in 1 seconds.

Reply
#3

Hmm, it sounds like you have trouble with the spawning part in your code.
Reply
#4

Quote:
Originally Posted by Sniper Kitty
Посмотреть сообщение
Use AddPlayerClass in the OnGameModeInit callback.
Wtf you talking I have problem with spawn,cant spawn ..I have in ongamemodint addplayerclass -.-

Код:
public OnGameModeInit()
{
    Textovi = TextDrawCreate(3.3750, 430.0, "Za listu online admina napisi /admins");
    TextDrawTextSize(Textovi,629.000000,2.000000);
    TextDrawFont(Textovi,1);
    TextDrawLetterSize(Textovi,0.499999,1.399999);
    TextDrawColor(Textovi,0x00FF6EFF);
    TextDrawSetProportional(Textovi,1);
    SetTimer("Textovi2",15000,true);
	// Don't use these lines if it's a filterscript
	SetGameModeText("Blank Script");
    // Ballas
    AddPlayerClass(104,1979.1917,-1222.0964,25.1824,97.3597,0,0,0,0,0,0); // 104=Skin , 1979.1917 =X ect....
    // Groves
    AddPlayerClass(107,2508.5671,-1673.6665,13.3793,86.2585,0,0,0,0,0,0);
	return 1;
}
And this is my command about choosing skin (dont work spawn button :S)

Код:
public OnPlayerRequestClass(playerid, classid)
{
	if(classid == 0)
	{
	gTeam[playerid] = BALLAS;
	GameTextForPlayer(playerid,"~p~Ballas",3000,5); // This will show up an Text , when you select your class
	SetPlayerPos(playerid,1975.2399,-1220.0157,25.0779); // position of the player in the class selection
	SetPlayerCameraPos(playerid,1969.5686,-1224.0016,24.9909); // Cameraposition
	SetPlayerCameraLookAt(playerid,1975.2399,-1220.0157,25.0779);
	SetPlayerFacingAngle(playerid,122.4500);
	SetPlayerColor(playerid,0xA000FFFF); // Teamcolor
	}
	else if(classid == 1)
	{
	gTeam[playerid] = GROVES;
	GameTextForPlayer(playerid,"~g~Grove Street Famlilys",3000,5);
	SetPlayerPos(playerid,2500.6060,-1672.1453,13.3512);
	SetPlayerCameraPos(playerid,2507.0615,-1674.3574,13.3732);
	SetPlayerCameraLookAt(playerid,2500.6060,-1672.1453,13.3512);
	SetPlayerFacingAngle(playerid,252.4717);
	SetPlayerColor(playerid,0x55FF00FF);
	}
	SpawnPlayer(playerid);
}
Reply
#5

Код:
public OnPlayerSpawn(playerid)
{
       SetPlayerPos(playerid, x, y, z);
       return 1;
}
Could this be what your looking for? From what I understand your player isn't spawning which means you have no spawn. An I correct or not ?

Written on my iPhone so it's not the best
Reply
#6

Quote:
Originally Posted by Socan
Посмотреть сообщение
Код:
public OnPlayerSpawn(playerid)
{
       SetPlayerPos(playerid, x, y, z);
       return 1;
}
Could this be what your looking for? From what I understand your player isn't spawning which means you have no spawn. An I correct or not ?

Written on my iPhone so it's not the best
I dont understand you,what to write setplayerpos? lol its write an warn if i write that ..My onplayerspawn looks like this:
Код:
public OnPlayerSpawn(playerid)
{
    StopAudioStreamForPlayer(playerid);
    TextDrawShowForPlayer(playerid, Textovi);
	return 1;
}
Can u come to computer and i send you my gm and you can see?
Reply
#7

You need too add the SetPlayerPos, too get this go In game and look or your spawn then do /save. Then search on your computer for 'saved positions'. Take the first 3 big numbers and place them like this;

Код:
SetPlayerPos(playerid, x, y, x);
Just put that under the text draw one above return 1
Reply
#8

Quote:
Originally Posted by Socan
Посмотреть сообщение
You need too add the SetPlayerPos, too get this go In game and look or your spawn then do /save. Then search on your computer for 'saved positions'. Take the first 3 big numbers and place them like this;

Код:
SetPlayerPos(playerid, x, y, x);
Just put that under the text draw one above return 1
Dont work..
Reply
#9

Show OnPlayerRequestSpawn callback with you're using.
Reply
#10

Quote:
Originally Posted by Riddick94
Посмотреть сообщение
Show OnPlayerRequestSpawn callback with you're using.
Think this? I have blank

Код:
public OnPlayerRequestSpawn(playerid)
{
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)