08.07.2011, 11:24
OMFG, convert it to strcmp..... LAZY KID!
I bet a pedobear will ate you tomorrow.......
And a nyancat will annoy you when you sleep........
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;
}