07.08.2011, 07:15
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
and no this client message
PHP код:
SendClientMessage(playerid, Green, "Please wait before using /takeoff again.");
PHP код:
command(takeoff, playerid, params[])
{
if(HasTakeOff[playerid] == 1)
{
SendClientMessage(playerid, Green, "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(tmpcar, 2431.6775,320.9064,33.3247);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
HasTakeOff[playerid] =1;
SetTimer("TakeOffReset",40000, 0);
}
else
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,2431.6775,320.9064,33.3247);
}
}
}
else if(gTeam[playerid] == Axis)
{
SendClientMessage(playerid, Red, "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(tmpcar, 1121.6018,572.1331,20.6020);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
HasTakeOff[playerid] =1;
SetTimer("TakeOffReset",40000, 0);
}
else
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,1121.6018,572.1331,20.6020);
}
}
}
else if(gTeam[playerid] == Allied)
{
SendClientMessage(playerid, Red, "You Need to be in Rustler");
}
return 1;
}