Hello, i have a problem, i made a car system, in the server when i play it work but aftes some time, maybe 30 minutes, idk, it stop working, somebody know how can i fix it?
Код:
CMD:car(playerid,params[])
{
#pragma unused params
if(pS[Zone] != Normal && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid,Red,"You are not allowed to use this command in this zone");
if(pS[DoingStunt] != Negative && pS[DoingStunt] != 255) return SendClientMessage(playerid,Red,"You are not allowed to use this command when you are doing a stunt! exit your vehicle.");
if(IsPlayerInArea(playerid,383.865234,425.736877, 2433.927001,2475.773925) == 1) return SendClientMessage(playerid,Red,"You cannot spawn a vehicle in this building!");
if(IsPlayerInArea(playerid,1915.172,2008.595,15 99.869,1646.58) == 1) return SendClientMessage(playerid,Red,"You cannot spawn a vehicle in this Green spawnzone!");
if(!strlen(params)) return ShowVehicleDialog(playerid);
new Index;
new tmp[256]; tmp = strtok(params,Index);
new tmp2[256]; tmp2 = strtok(params,Index);
new tmp3[256]; tmp3 = strtok(params,Index);
if(!strlen(tmp)) return
SendClientMessage(playerid,Red,"/car [ModelID/Name] [Colour1] [Colour2]");
new car;
new colour1, colour2;
if(!IsNumeric(tmp))
car = GetVehicleModelIDFromName(tmp);
else car = strval(tmp);
if(car < 400 || car > 611) return SendClientMessage(playerid,Red,"Invalid Vehicle Model ID!");
switch (car)
{
case 520,476,425,447,469: if(pS[Admin] < 1 && pS[Vip] < 2) return SendClientMessage(playerid,Red,"This vehicle is only spawnable for Admins and Vips!");
case 464,465,501,441,594,564: return SendClientMessage(playerid,Red,"RC vehicles are not allowed!");
case 569,590,570,537,538,449,432,435,450,591,606,607,610,584,608,611: return SendClientMessage(playerid,Red,"This vehicle is not allowed!");
}
if(!strlen(tmp2)) colour1 = random(126); else colour1 = strval(tmp2);
if(!strlen(tmp3)) colour2 = random(126); else colour2 = strval(tmp3);
return SpawnCar(playerid,car,colour1,colour2);
}
Idk, this is not my script, i am just making new things, but you know why it dont work?