07.05.2009, 22:08
I have a good command:
EDIT: Change the color of the messages, as are the pattern of my Game Mode
Sorry for my bad english xD
Quote:
if (strcmp(cmdtext, "/lock", true)==0) { new State; new Float:X; new Float:Y; new Float:Z; if(IsPlayerInAnyVehicle(playerid)) { State=GetPlayerState(playerid); if(State!=PLAYER_STATE_DRIVER) { SendClientMessage(playerid,COLOR_RED,"You can only lock when driving!"); return 1; } new i; for(i=0;i<MAX_PLAYERS;i++) { if(i != playerid) { SetVehicleParamsForPlayer(GetPlayerVehicleID(playe rid),i, 0, 1); } } SendClientMessage(playerid, COLOR_COP_ELITE, "Vehicle Locked!"); GetPlayerPos(playerid,X,Y,Z); PlayerPlaySound(playerid,1056,X,Y,Z); return 1; } else { SendClientMessage(playerid, COLOR_RED, "You are not in a vehicle."); return 1; } } if (strcmp(cmdtext, "/destrancar", true)==0) { new State; new Float:X; new Float:Y; new Float:Z; if(IsPlayerInAnyVehicle(playerid)) { State=GetPlayerState(playerid); if(State!=PLAYER_STATE_DRIVER) { SendClientMessage(playerid,COLOR_RED,"You are not driving."); return 1; } new i; for(i=0;i<MAX_PLAYERS;i++) { SetVehicleParamsForPlayer(GetPlayerVehicleID(playe rid),i, 0, 0); } SendClientMessage(playerid, COLOR_COP_ELITE, "Vehicle Unlocked"); GetPlayerPos(playerid,X,Y,Z); PlayerPlaySound(playerid,1057,X,Y,Z); return 1; } else { SendClientMessage(playerid, COLOR_RED, "You are not in any vehicle"); return 1; } } |
Sorry for my bad english xD