Checkpoint problem ?
#1

Hi everyone, I made a race system. It appears to me only checkpoint. Do not appear to other players. What's the problem ?
I'm sorry for my bad English.


Код:
enum yarisBilgileri
{
	count,
	yarisIsmi[32],
	yarisAraci,
	Float:CPx[MAX_CP],
	Float:CPy[MAX_CP],
	Float:CPz[MAX_CP],
	Float:PosX[MAX_CP],
	Float:PosY[MAX_CP],
	Float:PosZ[MAX_CP],
	Float:PosA[MAX_CP],
    SpawnSayisi,
    CPSayisi,
    yarisParasi,
    yarisSkoru,
    
}
new yarisIslem[MAX_YARIS][yarisBilgileri];

new CPArttir[MAX_PLAYERS];
new CPArttirx[MAX_PLAYERS];

forward OyunculariBekle();
public OyunculariBekle()
{
foreach(new i: Player)
{
new str[128];
if(Sure == 0)
{
KillTimer(YarisTimeri);
Sure = 30+1;
if(GetPVarInt(i,"Yaristayim") == 1)
{
//The problem here
yarisIslem[yarisIDcek][count] = SetPlayerRaceCheckpoint(i,0,yarisIslem[yarisIDcek][CPx][CPArttir[i]],yarisIslem[yarisIDcek][CPy][CPArttir[i]],yarisIslem[yarisIDcek][CPz][CPArttir[i]],yarisIslem[yarisIDcek][CPx][CPArttirx[i]],yarisIslem[yarisIDcek][CPy][CPArttirx[i]],yarisIslem[yarisIDcek][CPz][CPArttirx[i]],5.0);
//
TogglePlayerControllable(i,1);
format(str,sizeof(str),"~y~~h~Basla !");
GameTextForPlayer(i,str, 1100, 5);
}
return 1;
}
Sure--;
format(str,sizeof(str),"~y~~h~Yarisin Baslamasina: ~w~~h~%d",Sure);
if(GetPVarInt(i,"Yaristayim") == 1)
{
GameTextForPlayer(i,str, 1100, 5);
}
}
return 1;
}
Reply
#2

if(GetPVarInt(i,"Yaristayim") == 1) - it is set to 1 for all players?
Reply
#3

Quote:
Originally Posted by Nin9r
Посмотреть сообщение
if(GetPVarInt(i,"Yaristayim") == 1) - it is set to 1 for all players?
No, just practicing this command.

Код:
CMD:ykatil(playerid,params[])
{
if(yarisDurumu == false) return SendClientMessage(playerid,0xFF0000FF,"Şuanda aktif bir yarış yok lьtfen başlamasını bekleyin !");
if(oyuncuTutari == yarisTutari) return SendClientMessage(playerid,0xFF0000FF,"Yarışın maksimum kapasitesine ulaşıldı, Diğer yarışı bekleyin !");
if(GetPVarInt(playerid,"Yaristayim") == 1) return SendClientMessage(playerid,0xFF0000FF,"Zaten yarıştasınız ?");
oyuncuTutari++;
yarisIslem[yarisIDcek][SpawnSayisi]++;
SetPVarInt(playerid,"Yaristayim",1);
switch(yarisIslem[yarisIDcek][SpawnSayisi])
{
	case 1..150:
	{
	SetPlayerPos(playerid,yarisIslem[yarisIDcek][PosX][oyuncuTutari],yarisIslem[yarisIDcek][PosY][oyuncuTutari],yarisIslem[yarisIDcek][PosZ][oyuncuTutari]);
	aracVer[playerid] = CreateVehicle(yarisIslem[yarisIDcek][yarisAraci],yarisIslem[yarisIDcek][PosX][oyuncuTutari],yarisIslem[yarisIDcek][PosY][oyuncuTutari],yarisIslem[yarisIDcek][PosZ][oyuncuTutari],yarisIslem[yarisIDcek][PosA][oyuncuTutari],-1,-1,-1);
	SetVehiclePos(aracVer[playerid],yarisIslem[yarisIDcek][PosX][oyuncuTutari],yarisIslem[yarisIDcek][PosY][oyuncuTutari],yarisIslem[yarisIDcek][PosZ][oyuncuTutari]);
	SetVehicleZAngle(aracVer[playerid],yarisIslem[yarisIDcek][PosA][oyuncuTutari]);
	PutPlayerInVehicle(playerid,aracVer[playerid],0);
	TogglePlayerControllable(playerid,0);
	}
}
DisableRemoteVehicleCollisions(playerid, 0);
return 1;
}
Reply
#4

Help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)