Please Help!!!!! Checkpoints !!!very important!!
#1

hi,

i create checkpoints like this:

SetPlayerCheckpointEx(playerid, 681.3374,-463.3429,22.5705, 2.0, 0);

But all the cp's shall be the same for all players in the server that means:
If one player sees a cp all the other players shall see the same cp.
If i enter this first cp it gets disabled and a new one appears somewhere else. till now everything is ok, but only for me. The other players still see the first cp. And if he enters the first cp first its the same. Hell see the 2nd cp but not me.

i hope u understand, if not please ask, please.


I think that happens because of playerid. Maybe i have to use sth. that is for all players. what do i have to do to solve this problem?

please help this is very important to me and some friends are waiting to play but with this bug its not possible.

regards.

ps: i hope someone can help me, im already crying .
Reply
#2

just for me to get it: lets assume there is 2 CPs if you enter CP 1 you'll see CP 2
but other players don't...if other player enter CP 1 he'll see CP 2 but other players but him will not?
Reply
#3

hi, thx for ur answer.

at the beginning of the game there is only 1 cp.
But as soon as Player1 enters cp1 cp1 gets disabled and cp2 appears.
Thats how it should be for all players in the server.
But its not.
Player2 still sees the cp1. he must enter the cp1 to get the cp2.
But Player1 already creatted cp2.

i hope u can understand my strange problem
Reply
#4

i see...i guess its because the playerid thing...
i recommend use the cp streamer http://forum.sa-mp.com/showthread.ph...hlight=stremer
(alot more functions is included there too...)
and when you do CreateDynamicCP at the playerid field type -1...
its suppose to work...
simply do CreateDynamicCP and when any player enters it you do DestroyDynamicCP
Reply
#5

after ur answer ive got a bit more hope

it says error: undefined symbol: CreateDynamicCP
or do i have to install the cp streamer first?
And where shall i write the cp creation code under (onplayerconnect?)
maybe thats also the problem, because cp1 is created new for every new player that connects.
Reply
#6

You dont have to use a CP Streamer for such an easy thing.

Just do SetPlayerCheckpoint for every player.
Reply
#7

hi,
puhh, i think i solved that problem, but i still need to know sth.
How to create a cp after e.g 20sec roundplay?
I tried it with a timer under ongamemodeinit but it didnt work.

regards.
Reply
#8

for the streamer you should include it in your game mode.... in the Server.Cfg you have to do "Plugins Streamer"
and you suppose to put it in th OnGameModeInit... hope i helped :]
Reply
#9

hi,
yeah thank u so much for ur help.
I got it done without a streamer but i need to know one thing to finish my gamemode:

How can i create the first cp on my map that is there from the start of the game.(At trhe beginning right after the server statrts)
I wrote my cp under the onplayerconnect but the problem is that everytime a new player connects it is there again (the cp1)
But cp1 shall only appear onece at the beginning.
Please help how can i get this done?

regards.
Reply
#10

You need a global variable like new bool:cpOnBeginning = true;

So check the variables value on OnPlayerConnect. If it's false, don't set the cp.
You have to set it to false, if you don't want the CP to apear on startup anymore.
Reply
#11

hi, im so thankfull for ur answer.

would it be possible to give this noob a little example?


This would be a lot easier for me.

regards
Reply
#12

Код:
new bool:setCPOnConnect = true;//Place this on top of your script

public OnPlayerConnect(playerid)
{
	if (setCPOnConnect)
		SetPlayerCheckpoint(playerid, 123.4, 567.8, 912.3, 1.0);
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
	setCPOnConnect = false;
	//Your other code here to set the next CP for every player
	return 1;
}
Reply
#13

hi,
i still have to test sth. but i think u solved my problem.
thank u very much

regards.
Reply
#14

for your second question... just set it at OnGameModeInit
Reply
#15

hi,
sorry, just dont know what u mean
What second question?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)