01.12.2012, 07:59
I make command /sweeper but it's have problem with save.When player stop working code save to the player file
The code is:
Код:
Sweeper=358008814
pawn Код:
if(strcmp(cmd, "/sweeper", true) == 0)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 574)
{
new vehicleid, engine,lights,alarm,doors,bonnet,boot,objective;
vehicleid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, 1, 1, alarm, doors, bonnet, boot, objective);
new time = tickcount() - 360000;
if(time < TimerInfo[playerid][CMD_sweeper]) return SendClientMessage(playerid, -1, "U need to wait 60 minutes to work again!");
TimerInfo[playerid][CMD_sweeper] = time;
SweepingJob[playerid] = 1;
SetPlayerCheckpoint(playerid,228.25,953.83,27.90,5);
SendClientMessage(playerid,COLOR_RED,"* Clean streets and you will get 5000$ and 1 Level Point.");
return 1;
}
else {
SendClientMessage(playerid, COLOR_RED,"U need to be in sweeper, to start working");
}
return 1;
}