settimer show
#1

i want in this command that when player type the command many times it will show him the seconds that he need to wait to use the command again.

and no this client message
PHP код:
SendClientMessage(playeridGreen"Please wait before using /takeoff again."); 
PHP код:
command(takeoffplayeridparams[])
{
if(
HasTakeOff[playerid] == 1)
{
SendClientMessage(playeridGreen"Please wait before using /takeoff again.");
return 
1;
}
if(
GetPlayerVehicleID(playerid) == Rustler1 ||
GetPlayerVehicleID(playerid) == Rustler2||
GetPlayerVehicleID(playerid) == Rustler6)
{
    if(
gTeam[playerid] == Axis)
    {
       if (
GetPlayerState(playerid) == 2)
        {
            new 
tmpcar GetPlayerVehicleID(playerid);
            
SetVehiclePos(tmpcar2431.6775,320.9064,33.3247);
            
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
            
HasTakeOff[playerid] =1;
            
SetTimer("TakeOffReset",400000);
        }
        else
        {
            
SetPlayerInterior(playerid,0);
            
SetPlayerPos(playerid,2431.6775,320.9064,33.3247);
        }
    }
}
else if(
gTeam[playerid] == Axis)
{
SendClientMessage(playeridRed"You Need to be in Rustler");
}
if(
GetPlayerVehicleID(playerid) == Rustler3 ||
GetPlayerVehicleID(playerid) == Rustler4||
GetPlayerVehicleID(playerid) == Rustler5)
{
    if(
gTeam[playerid] == Allied)
    {
       if (
GetPlayerState(playerid) == 2)
        {
            new 
tmpcar GetPlayerVehicleID(playerid);
            
SetVehiclePos(tmpcar1121.6018,572.1331,20.6020);
            
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
            
HasTakeOff[playerid] =1;
            
SetTimer("TakeOffReset",400000);
        }
        else
        {
            
SetPlayerInterior(playerid,0);
            
SetPlayerPos(playerid,1121.6018,572.1331,20.6020);
        }
    }
}
else if(
gTeam[playerid] == Allied)
{
SendClientMessage(playeridRed"You Need to be in Rustler");
}
return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)