Skripta koju koristim: Moj GameMod od 0
Detaljan opis problema: Odradio sam jedan posao, radi se o jednostavnom poslu sa CP-ovima, ali komande mi ne rade....a i nista se ne desava kada udjem u to odredjeno vozilo...u gamemodu nemam errora...ali mi nista ne radi osim pickupa
Dio skripte: Evo ovde cu postaviti sve sta sam dodao:
//Ovo je dodano na vrhu
#define HotPoint1 2009.0814,-1728.1830,13.4533
#define HotPoint2 2009.0692,-1640.7626,13.4465
#define HotPoint3 2075.3311,-1643.5902,13.4073
#define HotPoint4 2138.3816,-1616.8345,13.4692
#define HotPoint5 2172.3430,-1675.6588,14.9697
#define HotPoint6 2308.7888,-1665.8096,14.3982
#define HotPoint7 2503.9426,-1658.8201,13.3568
#define HotPoint8 2376.7712,-1907.2572,13.2880
#define HotPoint9 2238.4990,-1902.2578,13.4472
#define HotPoint10 1131.9427,-2037.3005,68.9129
#define HotPoint11 1623.0204,-1858.5880,13.4557
#define Refillpoint 1618.9200,-1892.1852,13.4540
new hotdog = 0;
new hotinfo;
//Vozila i Pickup
AddStaticVehicle(588,1023.8110,-1344.6846,13.5443,88.3900,0,0); // HOTDOG AUTO 1
AddStaticVehicle(588,1023.8058,-1350.0800,13.5416,90.9714,0,0); // HOTDOG AUTO 2
AddStaticVehicle(588,1023.9210,-1355.6104,13.5461,90.9077,0,0); // HOTDOG AUTO 3
hotinfo = CreatePickup(1239,1,1031.3514,-1338.1083,13.7266,-1);
Sada komanda, ovo mi je prva komanda pod OnPlayerCommandText jer radim u ZCMD-u
public OnPlayerCommandText(playerid, cmdtext[])//tu sam
{
if (strcmp("/hotdog", cmdtext, true, 10) == 0)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 58😎
{
hotdog = 1;
SetPlayerCheckpoint(playerid, HotPoint1, 3.0);
GameTextForPlayer(playerid, "~g~Zapoceli ste dostavu HotDog-ova srecno.!", 3000, 3);
return 1;
}
SendClientMessage(playerid, COLOR_RED,"Morate biti u kombiju za dostavu");
}
if (strcmp("/hotdoginfo", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_YELLOW, "Vas zadatak je da raznosete hotdog-ove na odredjene adrese.");
SendClientMessage(playerid, COLOR_YELLOW, "Za dobro obavljen posao dobijate novac.");
SendClientMessage(playerid, COLOR_YELLOW, "Kada udjete u vozilo za dostavu kucajte /hotdog da zapocnete.");
return 1;
}
return 0;
}
Sada kada dodje na CP ove da mu ispise text i salje ga na sledeci
public OnPlayerEnterCheckpoint(playerid)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 58😎
{
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint1))
{
SetPlayerCheckpoint(playerid, HotPoint2, 7.0);
GameTextForPlayer(playerid, "~g~1 Dostavljeno!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint2))
{
SetPlayerCheckpoint(playerid, HotPoint3, 7.0);
GameTextForPlayer(playerid, "~g~2 Dostavljeno!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint3))
{
SetPlayerCheckpoint(playerid, HotPoint4, 7.0);
GameTextForPlayer(playerid, "~g~3 Dostavljeno!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint4))
{
SetPlayerCheckpoint(playerid, HotPoint5, 7.0);
GameTextForPlayer(playerid, "~g~4 Dostavljeno!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint5))
{
SetPlayerCheckpoint(playerid, Refillpoint, 7.0);
GameTextForPlayer(playerid, "~g~5 Dostavljeno, otidji do sledeceg CheckPointa da preuzmes paket HotDog-ova!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,Refillpoint))
{
SetPlayerCheckpoint(playerid, HotPoint6, 7.0);
GameTextForPlayer(playerid, "~g~Utovareno!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint6))
{
SetPlayerCheckpoint(playerid, HotPoint7, 7.0);
GameTextForPlayer(playerid, "~g~6 Dostavljeno!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint7))
{
SetPlayerCheckpoint(playerid, HotPoint8, 7.0);
GameTextForPlayer(playerid, "~g~7 Dostavljeno!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint😎)
{
SetPlayerCheckpoint(playerid, HotPoint9, 7.0);
GameTextForPlayer(playerid, "~g~8 Dostavljeno!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint9))
{
SetPlayerCheckpoint(playerid, HotPoint10, 7.0);
GameTextForPlayer(playerid, "~g~9 Dostavljeno!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint10))
{
SetPlayerCheckpoint(playerid, HotPoint11, 7.0);
GameTextForPlayer(playerid, "~g~10 Dostavljeno, vrati se do firme!", 3000, 3);
}
if (IsPlayerInRangeOfPoint(playerid, 7.0,HotPoint11))
{
GivePlayerMoney(playerid, 800);
GameTextForPlayer(playerid, "~g~Zaradili ste $800,-!", 3000, 3);
new veh;
veh = GetPlayerVehicleID(playerid);
SetVehicleToRespawn(veh);
DisablePlayerCheckpoint(playerid);
hotdog = 0;
}
}
}
Sada da moze da zapocne posao ako je u odredjenom vozilu
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 58😎
{
SendClientMessage(playerid, COLOR_RED, "Da zapocnete posao kucajte /hotdog");
}
return 0;
}
Ovo je ono ako napusti da se moze vratiti
public OnPlayerExitVehicle(playerid, vehicleid)
{
if((hotdog) == 1)
{
hotdog = 0;
SendClientMessage(playerid, COLOR_RED, "Napustili ste vozilo za dostavu, vratite se u njega kako bi nastavili sa poslom.");
}else if((hotdog) == 0){
}
}
Ukoliko pogine....
public OnPlayerDeath(playerid, killerid, reason)
{
DisablePlayerCheckpoint(playerid);
hotdog = 0;
return 1;
}
I ovo za onaj info pickup
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == hotinfo)
{
GameTextForPlayer(playerid, "~g~Dobrodosli, use /hotdoginfo da saznate vise o ovome poslu", 3000, 3);
}
}
Neke slike/video za lakse dobivanje pomoci(neobavezno):
[Pomoć] Problem sa poslom
421
pregleda
1
postova
3. Dec. 2011.
Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava