08.10.2015, 13:39
Hi, i have made that the dropcar timer will show in minutes and seconds, so when less than one minute it will start counting in seconds, but when the timer is done and type /dropcar Again, it still says You already sold a car, you'll have to wait 0 seconds before you can sell another, and then the dropcar checkpoint appears... i hope you gys can help me
pawn Код:
if(strcmp(cmd, "/dropcar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerOnMission[playerid] > 0)
{
SendClientMessage(playerid, COLOR_GREY, " On a mission right now, can't use this command !");
return 1;
}
if((GetPlayerState(playerid)) == 3){
SendClientMessage(playerid, COLOR_GREY, " Hey, this isn't your vehicle!");
return 1;
}
if(PlayerInfo[playerid][pCarTime] > 60)
{
format(string, sizeof(string), "You already sold a car, you'll have to wait %d minutes before you can sell another.", SecondsToMinutes(PlayerInfo[playerid][pCarTime]));
SendClientMessage(playerid, COLOR_GREY, string);
}
if(PlayerInfo[playerid][pCarTime] < 60 || PlayerInfo[playerid][pCarTime] > 0)
{
format(string, sizeof(string), "You already sold a car, you'll have to wait %d seconds before you can sell another.", PlayerInfo[playerid][pCarTime]);
SendClientMessage(playerid, COLOR_GREY, string);
}
if(PlayerInfo[playerid][pCarTime] == 0)
{
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);
}
}
return 1;
}