14.02.2009, 18:36
Quote:
if(newkeys == KEY_WALK) { if(IsPlayerInAnyVehicle(playerid)) { if(IsPlayerConnected(playerid)) { new Vehicle = GetPlayerVehicleID(playerid); if(VehicleStarted[Vehicle] == 1) { new sendername[MAX_PLAYER_NAME]; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* %s turns the engine off", sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE); printf("%s", string); VehicleStarted[Vehicle] = 0; TogglePlayerControllable(playerid,1); RemovePlayerFromVehicle(playerid); }else{ SendClientMessage(playerid,0xAFAFAFAA,"[!] The engine is already off!"); } } } } if(newkeys == KEY_WALK) { if(IsPlayerInAnyVehicle(playerid)) { if(IsPlayerConnected(playerid)) { new Vehicle = GetPlayerVehicleID(playerid); if(VehicleStarted[Vehicle] == 0) { new sendername[MAX_PLAYER_NAME]; GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* %s tries to start the vehicle", sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE); printf("%s", string); GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~ g~Starting vehicle...",3000,3); SetTimerEx("Starting",3500,0,"i",playerid); }else{ SendClientMessage(playerid,COLOR_GRAD2,"[!] This vehicle is already started!"); } } } } return 0; } |