[Help]/truckduty Command - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Help]/truckduty Command (
/showthread.php?tid=395899)
[Help]/truckduty Command -
vannesenn - 28.11.2012
When I type a command /truckduty and a half minutes talking to me, or do not show the route, or we do not find a route, or show me a single business(LATC)
And when the type command throw that command does not exist
What's the problem?
Код:
if(strcmp(cmd, "/truckduty", true) == 0)
{
new timer;
//timer = random(900000)+300000;
timer = random(20000)+10000;
if(PlayerInfo[playerid][pPosao] != 5) return NisiOvlasten(playerid);
PlayerInfo[playerid][pTruckDuty] = 1;
SetTimerEx("TruckNews", timer, false, "i", playerid);
SCM(playerid, COLOR_WHITE,"Prijavljen si na burzu slodobnih vozaca. Uskoro ocekujte odgovor...");
}
Код:
public TruckNews(playerid)
{
new truckodgovor;
new playername[MAX_PLAYER_NAME];
new string[256];
new imefirme[20];
truckodgovor=random(3)+0;
if(truckodgovor == 1) { imefirme = "LAGC(LA i okolina)"; }
else if(truckodgovor == 2) { imefirme = "LATC(LA)"; }
else if(truckodgovor == 3) { imefirme = "LAGC(California)"; }
if(truckodgovor == 0)
{
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "SMS: Nazalost gospodine %s, za Vas nismo nasli rutu. Molimo pokusajte ponovno. Salje: Burza za kamiondzije(Unknow)",playername);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
if(truckodgovor == 1 || truckodgovor == 2 || truckodgovor == 3)
{
format(string, sizeof(string), "SMS: Vi ste jedan od sretnika! Za Vas smo pronasli rutu. Vozite za: %s. Molimo odlucite o ponudi. Salje: Burza za kamiondzije(Unknow)", imefirme);
SendClientMessage(playerid, COLOR_YELLOW, string);
SPD(playerid, DIALOG_ACCEPTTRUCK, DIALOG_STYLE_LIST,"Odlucite...","Prihvacam\nOdbijam","Potvrdi","Odustani");
}
return 1;
}
Re: [Help]/truckduty Command -
vannesenn - 28.11.2012
Somebody help?
Re: [Help]/truckduty Command -
NumbSkull - 28.11.2012
on the first code you need a return 1; under the code or it will say it doesnt exist but still do it on the 2nd i dont see any set checkpoint or w/e to show the way and i only read in english xD
Re: [Help]/truckduty Command -
vannesenn - 28.11.2012
I understand you