I make command /sweeper but it's have problem with save.When player stop working code save to the player file
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;
}
you needa ****** a bit for your problem or paste me the code whats your problem and which login / register system
your using with what variables show the lines if you wanna fix your problems man
pawn Код:
enum timer_data
{
CMD_sweeper,
CMD_pizza,
CMD_bus,
CMD_truck,
CMD_hotdog
};
new TimerInfo[MAX_PLAYERS][timer_data];