Annoying problem!
#2

PHP код:
if(strcmp(cmd"/dropcar"true) == 0)
{
    if(
IsPlayerConnected(playerid))
    {
        if(
PlayerOnMission[playerid] > 0) return SendClientMessage(playeridCOLOR_GREY"   On a mission right now, can't use this command !");
        if((
GetPlayerState(playerid)) == 3) return SendClientMessage(playeridCOLOR_GREY"   Hey, this isn't your vehicle!");
        if(
PlayerInfo[playerid][pCarTime] > 60// check if it's above 1 minute.
        
{
            
format(stringsizeof(string), "You already sold a car, you'll have to wait %d minutes before you can sell another."SecondsToMinutes(PlayerInfo[playerid][pCarTime]));
            
SendClientMessage(playeridCOLOR_GREYstring);
        }
        else if(
PlayerInfo[playerid][pCarTime] < 60 && PlayerInfo[playerid][pCarTime] > 0// checks if it's below 1 minute but above 0 seconds.
        
{
            
format(stringsizeof(string), "You already sold a car, you'll have to wait %d seconds before you can sell another."PlayerInfo[playerid][pCarTime]);
            
SendClientMessage(playeridCOLOR_GREYstring);
        }
        else 
// it can only be 0.
        
{
            
GameTextForPlayer(playerid"~w~Car Selling ~n~~r~Drop the car at the Crane"50001);
            
CP[playerid] = 1;
            
SetPlayerCheckpoint(playerid2506.9529,-2629.9968,13.6465,8.0);
        }
    }
    return 
1;

Reply


Messages In This Thread
Annoying problem! - by Mikkel_RE - 08.10.2015, 13:39
Re: Annoying problem! - by d3ll - 08.10.2015, 13:48
Re: Annoying problem! - by Mikkel_RE - 08.10.2015, 13:53

Forum Jump:


Users browsing this thread: 1 Guest(s)