Commands help.. - 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: Commands help.. (
/showthread.php?tid=574829)
Commands help.. -
dundolina - 20.05.2015
Hello, i have 2 commands and they are the same but the coalmine command timer for waiting to start again the job work, but sweep timer dont work.. What is the problem?
Код:
if (strcmp("/sweep", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 10.0, 583.9775,1225.9344,11.7188))
{
if(PlayerInfo[playerid][pSweep1] != 0)
{
format(string, sizeof(string), "В момента не можеш да работиш тази работа!");
SendClientMessage(playerid, COLOR_GRAD1, string);
return 1;
}
sweep[playerid] = 1;
SetPlayerColor(playerid, COLOR_JOB);
ToggleEngine(carsweep[1], VEHICLE_PARAMS_ON);
ToggleEngine(carsweep[2], VEHICLE_PARAMS_ON);
ToggleEngine(carsweep[3], VEHICLE_PARAMS_ON);
ToggleEngine(carsweep[4], VEHICLE_PARAMS_ON);
SetPlayerVirtualWorld(playerid, 229);
SetPlayerCheckpoint(playerid, SweepCheckPoint1, 3.0);
format(string, sizeof(string), "Sweep: Ти започна работа като чистач на улиците, качи се превозното средство и следвай червените маркери!");
SendClientMessage(playerid, COLOR_GREEN, string);
return 1;
} else {
SendClientMessage(playerid, COLOR_GRAD1,"Трябва да се качиш в самосвала, за да започнеш работа!");
}
return 1;
}
Код:
if (strcmp("/coalmine", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 10.0, 816.5459,857.0498,12.7891))
{
if(PlayerInfo[playerid][pCoalmine1] != 0)
{
format(string, sizeof(string), "В момента не можеш да работиш тази работа!");
SendClientMessage(playerid, COLOR_GRAD1, string);
return 1;
}
coalmine[playerid] = 1;
SetPlayerColor(playerid, COLOR_JOB);
ToggleEngine(carcoalmine[1], VEHICLE_PARAMS_ON);
ToggleEngine(carcoalmine[2], VEHICLE_PARAMS_ON);
ToggleEngine(carcoalmine[3], VEHICLE_PARAMS_ON);
ToggleEngine(carcoalmine[4], VEHICLE_PARAMS_ON);
SetPlayerVirtualWorld(playerid, 224);
SetPlayerCheckpoint(playerid, CoalmineCheckPoint1, 3.0);
format(string, sizeof(string), "Coalmine: Ти започна работа като шофьор на самосвал, качи се самосвала и следвай червените маркери!");
SendClientMessage(playerid, COLOR_GREEN, string);
return 1;
} else {
SendClientMessage(playerid, COLOR_GRAD1,"Трябва да се качиш в самосвала, за да започнеш работа!");
}
return 1;
}
Re: Commands help.. -
dundolina - 21.05.2015
Help, please..
Re: Commands help.. -
dundolina - 21.05.2015
I fix the problem.
Re: Commands help.. -
Azula - 21.05.2015
what SweepCheckPoint1 refer to ?
edit : delete