02.10.2015, 11:00
(
Последний раз редактировалось Mikkel_RE; 02.10.2015 в 12:42.
)
Thank you for helping me out this.
PlayerInfo[playerid][pLastDropTime]
PlayerInfo[playerid][pLastDropTime] = gettime();
if((PlayerInfo[playerid][pLastDropTime] + (20 * 60 * 1000)) < gettime())
{
// rest of command here
}
if(strcmp(cmd, "/dropcar", true) == 0)
{
if((PlayerInfo[playerid][pLastDropTime] + (20 * 60 * 1000)) < gettime())
{
//if(PlayerInfo[playerid][pJob] == 5)
//{
if(PlayerOnMission[playerid] > 0)
{
SendClientMessage(playerid, COLOR_GREY, " On a mission right now, can't use this command !");
return 1;
}
if((GetPlayerState(playerid)) == 3){//checks if passenger
SendClientMessage(playerid, COLOR_GREY, " Hey, this isn't your vehicle!"); // sends error
return 1;
}
GameTextForPlayer(playerid, "~w~Car Selling ~n~~r~Drop the car at the Crane", 5000, 1);
CP[playerid] = 1;
SetPlayerCheckpoint(playerid, 2506.9529,-2629.9968,13.6465,8.0);
PlayerInfo[playerid][pLastDropTime] = gettime();
//}
//else
//{
// SendClientMessage(playerid, COLOR_GREY, " You are not a Car Jacker !");
//}
}
else
{
format(string, sizeof(string), "You already sold a car, you'll have to wait %d minutes before you can sell another.", SecondsToMinutes(PlayerInfo[playerid][pLastDropTime]));
SendClientMessage(playerid, COLOR_GREY, string);
return 1;
}
return 1;
}