VehRepair Command Problem
#10

OMFG, convert it to strcmp..... LAZY KID!
I bet a pedobear will ate you tomorrow.......
And a nyancat will annoy you when you sleep........

pawn Код:
new
    gVehDelay[ playerid ] = { -1, ... }
;

public OnPlayerCommandText( playerid, cmdtext[ ] )
{
    if ( !strcmp( cmdtext, "/vehrepair", true ) )
    {
        if ( !IsPlayerInAnyVehicle( playerid ) )
            return SendClientMessage( playerid, -1, "Silly boy, you are not in any vehicle." );

        if ( gVehDelay[ playerid ] != -1 )
            return SendClientMessage( playerid, -1, "Please wait before using the command again! Or pedobear will ate you." );
       
        if ( GetPlayerMoney( playerid ) < 14500 )
            return SendClientMessage( playerid, -1, "Not enough money. Kill a pedobear for money!" );

        RepairVehicle( GetPlayerVehicleID( playerid ) );

        gVehDelay[ playerid ] = 10;

        SetTimerEx( "useRepairAgain", 120000, false, "i", playerid );

        return 1;
    }

    return 0;
} // Ye I know, indentation sucks :D

forward useRepairAgain( playerid ); public useRepairAgain( playerid )
{
    gVehDelay[ playerid ] = -1;

    SendClientMessage( playerid, -1, "Now you can /repairveh your car again!" );

    return 1;
}
Reply


Messages In This Thread
VehRepair Command Problem - by IvancheBG - 08.07.2011, 08:50
Re: VehRepair Command Problem - by IvancheBG - 08.07.2011, 10:21
Re: VehRepair Command Problem - by Basicz - 08.07.2011, 10:27
Re: VehRepair Command Problem - by [HiC]TheKiller - 08.07.2011, 10:27
Re: VehRepair Command Problem - by IvancheBG - 08.07.2011, 10:52
Re: VehRepair Command Problem - by IvancheBG - 08.07.2011, 11:03
Re: VehRepair Command Problem - by Basicz - 08.07.2011, 11:11
Re: VehRepair Command Problem - by IvancheBG - 08.07.2011, 11:13
Re: VehRepair Command Problem - by Rolyy - 08.07.2011, 11:13
Re: VehRepair Command Problem - by Basicz - 08.07.2011, 11:24

Forum Jump:


Users browsing this thread: 3 Guest(s)