Detaljan opis problema: Pokusao sam dodati polaganje po jednom tutu,ali nisam uspeo,tj imam warninge i ja mislim da ako njih ne resim da nece ni raditi ,tj siguran sam 😛
Dio skripte:
if(PlayerInfo > 0)
{
if(PlayerToPoint(121, playerid,2049.5449,-1930.6815,13.3828,121))//ovdje dodajte vase kooridnate i radius prvog cp-a
{
if(PlayerInfo == 1)//
{
new Veh = GetPlayerVehicleID(playerid);
if(Veh == 405 || Veh == 405 || Veh == 405)//provjerava dali je igrac u vozilima,ovdje stavite idove auta koje ste namjenili za polaganje
{
PlayerInfo = 2;// dodajemo vrijednost da se slucajno ne pogodi isti cp, ovo nije potrebno
SetPlayerCheckpoint(playerid,1932.5386,-1929.8541,13);//ovdje dodajte vase kooridnate i radius drugog cp-a
SendClientMessage(playerid, COLOR_LIGHTBLUE, "*Za pocetak odvozi jedan slalom!");//salje poruku igracu
}
}
}
if(PlayerToPoint(13, playerid,1932.5386,-1929.8541,13))//ovdje dodajte vase kooridnate i radius drugog cp-a
{
if(PlayerInfo == 2)//
{
new Veh = GetPlayerVehicleID(playerid);
if(Veh == 405 || Veh == 405 || Veh == 405)
{
PlayerInfo = 3;//
SetPlayerCheckpoint(playerid,1850.0459,-1470.4542,13);//ovdje dodajte vase kooridnate i radius treceg cp-a
}
}
}
if(PlayerToPoint(13, playerid,1850.0459,-1470.4542,13))//ovdje dodajte vase kooridnate i radius treceg cp-a
{
if(PlayerInfo == 3)//
{
new Veh = GetPlayerVehicleID(playerid);
if(Veh == 405 || Veh == 405 || Veh == 405)
{
PlayerInfo = 4;//
SetPlayerCheckpoint(playerid,1425.5768,-1725.9020,13);//ovdje dodajte vase kooridnate i radius cetvrtog cp-a
SendClientMessage(playerid, COLOR_LIGHTBLUE, "*Bravo, sada skreni lijevo i parkiraj se!");//salje poruku igracu
}
}
}
if(PlayerToPoint(13, 2052.9685,-1909.3401,13))//ovdje stavite koordinate zadnjeg cp-a
{
if(PlayerInfo == 4)//ovdje ide vrijednost zadnjeg cp-a, tj. koji je to cp po redu
{
new Veh = GetPlayerVehicleID(playerid);
if(Veh == 405 || Veh == 405 || Veh == 405)
{
PlayerInfo = 0;//oznacava da je igrac zavrsio polaganje
DisablePlayerCheckpoint(playerid);//uklanja cp
SendClientMessage(playerid, COLOR_GREEN ,"*Polaganje zavrseno");//salje poruku igracu
SetVehicleToRespawn(GetPlayerVehicleID(playerid));//respawna vozilo
RemovePlayerFromVehicle(playerid);//izbacuje igraca iz vozila
new MaxPlayers = GetMaxPlayers();
for(new forplayerid; forplayerid < MaxPlayers; forplayerid++)
{
if(!IsPlayerConnected(forplayerid)) continue;
new
VehicleID = GetPlayerVehicleID(forplayerid),
Float:Health;
if(VehicleID)
{
GetVehicleHealth(VehicleID, Health);//provjerava health vozila
if(Health > 950)//ako je health vozila veci od 950 igrac dobiva vozacku, vi mozete staviti na kolko hocete
{
PlayerInfo = 1;//daje vozacku dozvolu igracu
SendClientMessage(playerid, COLOR_DBLUE ,"Cestitamo, dobio si Vozacku Dozovlu");//salje poruku igracu
}
else
{
SendClientMessage(playerid, COLOR_RED ,"Nazalost niste dobili vozacku dozovlu");//ovu poruku ce poslati igracu samo ako mu je vozilu health ispod 950
return 1;
}
}
}
}
}
}
}Neke slike/video za lakse dobivanje pomoci(neobavezno)://
Erori:
C:\Documents and Settings\Daniel\My Documents\Downloads\GTARP\gamemodes\mojgt.pwn(4462) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Daniel\My Documents\Downloads\GTARP\gamemodes\mojgt.pwn(4470) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Daniel\My Documents\Downloads\GTARP\gamemodes\mojgt.pwn(4483) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Daniel\My Documents\Downloads\GTARP\gamemodes\mojgt.pwn(4495) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Daniel\My Documents\Downloads\GTARP\gamemodes\mojgt.pwn(4500) : warning 213: tag mismatch
C:\Documents and Settings\Daniel\My Documents\Downloads\GTARP\gamemodes\mojgt.pwn(4500) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Daniel\My Documents\Downloads\GTARP\gamemodes\mojgt.pwn(12486) : warning 202: number of arguments does not match definitionDodati: Nisam shvatio te radiuse ,dobijem ovo kad sacuvam neki checkpoint : AddStaticVehicle(405,1932.5386,-1929.8541,13.2578,87.7773,1,1); // Sta je tu radius? 😛
