17.02.2013, 14:15
How do I make a check if a hour has passed and eventually it will SetWorldTime
SetTimer("WorldTimer",1000*60*60,1);//Should be put in OnGameModeInIt call back.
//If you don't know what this is, put it at the bottom of the script.
forward WorldTimer();
public WorldTimer()
{
SetWorldTimer(0);//Your choice.
}
CMD:getcar(playerid, params[])
{
new vehicle, Float:x, Float:y, Float:z;
if(!CheckAdmin(playerid, ADMIN_LEVEL_1)) return NotAuthMSG(playerid);
if(sscanf(params,"d",vehicle)) return SyntaxMSG(playerid, "/getcar [vehicleid]");
if(vehicle > MAX_VEHICLES) return SCM(playerid, -1, "No such vehicle.");
GetPlayerPos(playerid, x, y, z);
SetVehiclePos(vehicle, x, y+4, z);
return 1;
}
CMD:gotocar(playerid, params[])
{
new vehicle, Float:x, Float:y, Float:z;
if(!CheckAdmin(playerid, ADMIN_LEVEL_1)) return NotAuthMSG(playerid);
if(sscanf(params,"d",vehicle)) return SyntaxMSG(playerid, "/gotocar [vehicleid]");
if(vehicle > MAX_VEHICLES) return SCM(playerid, -1, "No such vehicle.");
GetVehiclePos(vehicle, x, y, z);
PutPlayer(playerid, x+1, y+1, z);
return 1;
}
CMD:getcar(playerid, params[])
{
new vehicle, Float:x, Float:y, Float:z;
if(!CheckAdmin(playerid, ADMIN_LEVEL_1)) return NotAuthMSG(playerid);
if(sscanf(params,"d",vehicle)) return SyntaxMSG(playerid, "/getcar [vehicleid]");
if(vehicle == INVALID_VEHICLE_ID) return SCM(playerid, -1, "No such vehicle.");
GetPlayerPos(playerid, x, y, z);
SetVehiclePos(vehicle, x, y+4, z);
return 1;
}
CMD:gotocar(playerid, params[])
{
new vehicle, Float:x, Float:y, Float:z;
if(!CheckAdmin(playerid, ADMIN_LEVEL_1)) return NotAuthMSG(playerid);
if(sscanf(params,"d",vehicle)) return SyntaxMSG(playerid, "/gotocar [vehicleid]");
if(vehicle == INVALID_VEHICLE_ID) return SCM(playerid, -1, "No such vehicle.");
GetVehiclePos(vehicle, x, y, z);
PutPlayer(playerid, x+1, y+1, z);
return 1;
}
CMD:getcar(playerid, params[])
{
new vehicle, Float:x, Float:y, Float:z;
if(!CheckAdmin(playerid, ADMIN_LEVEL_1)) return NotAuthMSG(playerid);
if(sscanf(params,"d",vehicle)) return SyntaxMSG(playerid, "/getcar [vehicleid]");
if(vehicle == INVALID_VEHICLE_ID) return SCM(playerid, -1, "No such vehicle.");
GetPlayerPos(playerid, x, y, z);
SetVehiclePos(vehicle, x, y+4, z);
SetVehicleVirtualWorld(vehicle, GetPlayerVirtualWorld(playerid));
LinkVehicleToInterior(vehicle, GetInterior(playerid));
return 1;
}
CMD:getcar(playerid, params[])
{
new vehicle, Float:x, Float:y, Float:z;
if(!CheckAdmin(playerid, ADMIN_LEVEL_1)) return NotAuthMSG(playerid);
if(sscanf(params,"i",vehicle)) return SyntaxMSG(playerid, "/getcar [vehicleid]");
if(vehicle == INVALID_VEHICLE_ID) return SCM(playerid, -1, "No such vehicle.");
GetPlayerPos(playerid, x, y, z);
SetVehiclePos(vehicle, x, y+4, z);
SetVehicleVirtualWorld(vehicle, GetPlayerVirtualWorld(playerid));
LinkVehicleToInterior(vehicle, GetInterior(playerid));
return 1;
}