Quote:
Originally Posted by iDroid
Optimisation et indentation absente
pawn Code:
public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ) { if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Trolilolilol !"); if(IsPlayerInAnyVehicle(playerid)) { new CarID = GetPlayerVehicleID(playerid); new CarSeat = GetPlayerVehicleSeat(playerid); SetVehiclePos(CarID, fX, fY, fZ); return PutPlayerInVehicle(playerid, CarID, CarSeat); } return SetPlayerPos(playerid, fX, fY, fZ); }
10x mieux et prend moins de place
|
BG <3, mais perso je crois que les switch sont meilleur que les if ^^