Detaljan opis problema:Napravio sam komandu da se sa njom utovari les, a da se na odredjenim kordinatama istovari les.Al koliko vidim prvi put moze da istovari i bez utovara.Pomagajte pls
Skripta koju koristim:GTARP
Kodovi:if(!strcmp(cmdtext, "/utovariles", true))
{
if(IsPlayerConnected(playerid))
{
new vozilo = GetPlayerVehicleID(playerid);//Definiramo "vozilo" koje cemo koristiti dole u komandi.
if(PlayerInfo[playerid][pJob] != 25)
{
SendClientMessage(playerid, COLOR_GREY, "Niste pogrebnik!");
return 1;
}
if(!IsAPogrebnik(vozilo)) // proverava jel igrac u vozilu kosaca, ako nije nemoze da kosi travu
{
SendClientMessage(playerid, COLOR_GREY, "Ne nalazite se u vozilu pogrebnika!");
return 1;
}
if(!IsPlayerInRangeOfPoint(playerid, 3,940.0884,-1086.9725,24.2962)) return SendClientMessage(playerid, COLOR_GRAD1, "Ne nalazite se na mestu utovara lesa!");
if(GetPlayerState(playerid)!=2)
{
SendClientMessage(playerid-1,COLOR_GREY,"Morate da budete na mestu vozaca, da bi ste utovarili les!");
return 1;
}
if(IgracUtovaraLes[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GREY, "Vec ste zapoceli sa utovarom lesa!");
return 1;
}
if(IsAPogrebnik(idcar))
{
SetPlayerSkin(playerid, 68);
IgracUtovaraLes[playerid] = 1;
SetTimerEx("utovarlesa", 10000, false, "i", playerid);
SendClientMessage(playerid, COLOR_WHITE, "Sacekajte! Utovarate les.");
TogglePlayerControllable(playerid, 0);
//POGREBNIK
if(Ccp[playerid] == 26) // This checks if our variable equals to 1, if so: it continues
{
DisablePlayerCheckpoint(playerid); // This makes sure that there will be a new checkpoint
Ccp[playerid] = 27; // Changes the variable, so we can use it later again with OnPlayerEnterCheckpoint
SetPlayerCheckpoint(playerid, 2264.1702,-1339.9144,23.9830, 3.0); // Creates a new checkpoint at a different position
return 1;
}
if(Ccp[playerid] == 27) // This checks if our variable equals to 2, if so: it continues
{
DisablePlayerCheckpoint(playerid); // This will destroy the checkpoint, so you only get your reward once
Ccp[playerid] = 0; // This resets the variable, so if you enter a checkpoint right now, nothing will happen
return 1;
}
//ISTOVAR
if(!strcmp(cmdtext, "/istovariles", true))
{
if(IsPlayerConnected(playerid))
{
new vozilo = GetPlayerVehicleID(playerid);//Definiramo "vozilo" koje cemo koristiti dole u komandi.
if(PlayerInfo[playerid][pJob] != 25)
{
SendClientMessage(playerid, COLOR_GREY, "Niste pogrebnik!");
return 1;
}
if(!IsAPogrebnik(vozilo)) // proverava jel igrac u vozilu kosaca, ako nije nemoze da kosi travu
{
SendClientMessage(playerid, COLOR_GREY, "Ne nalazite se u vozilu pogrebnika!");
return 1;
}
if(!IsPlayerInRangeOfPoint(playerid, 3,2264.1702,-1339.9144,23.9830)) return SendClientMessage(playerid, COLOR_GRAD1, "Ne nalazite se na mestu istovara lesa!");
if(GetPlayerState(playerid)!=2)
{
SendClientMessage(playerid-1,COLOR_GREY,"Morate da budete na mestu vozaca, da biste istovarili les!");
return 1;
}
if(IgracIstovaraLes[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GREY, "Nemate les da bi ste ga istovarili!");
return 1;
}
if(IsAPogrebnik(idcar))
{
IgracIstovaraLes[playerid] = 1;
SetTimerEx("istovarlesa", 10000, false, "i", playerid);
TogglePlayerControllable(playerid, 0);
SendClientMessage(playerid, COLOR_WHITE, "Sacekajte! Istovarate les.");
GivePlayerMoney(playerid, 1000);
}
}
return 1;
}
Naci molim za pomoc jos jednom zato sto ne znam kako da napravim da ne moze da istovari dok ne utovari les.Hvala unapred
Citaj pravila,postaj ovdje to : http://balkan-samp.com/forum/index.php?board=11.0