if (strcmp(cmdtext, \"/lock\", true)==0 || strcmp(cmdtext, \"/lockcar\", true) == 0 || strcmp(cmdtext, \"/carlock\", true) == 0) { if(IsPlayerInAnyVehicle(playerid)) { new Stat5 ; Stat5=GetPlayerState(playerid); if(Stat5!=PLAYER_STATE_DRIVER) { SendClientMessage(playerid,COLOR_GREY,\"Csak a sofor tudja bezárni az autót!\"); return 1; } new i; for(i=0;i<MAX_PLAYERS;i++) { if(i != playerid) { SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1); } } SendClientMessage(playerid, COLOR_GREY, \"A jármu zárva!\"); } else { SendClientMessage(playerid, COLOR_GREY, \"Nincs jármu!\"); } return 1; }if (strcmp(cmdtext, \"/open\", true)==0 || strcmp(cmdtext, \"/unlockcar\", true) == 0 || strcmp(cmdtext, \"/carunlock\", true) == 0 || strcmp(cmdtext, \"/unlock\", true) == 0) { if(IsPlayerInAnyVehicle(playerid)) { new Stat6 ; Stat6 = GetPlayerState(playerid); if(Stat6!=PLAYER_STATE_DRIVER) { SendClientMessage(playerid,COLOR_GREY,\"Csak a sofor tudja kinyitni az autót!\"); return 1; } new i; for(i=0;i<MAX_PLAYERS;i++) { SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0); } SendClientMessage(playerid, COLOR_GREY, \"A jármu nyitva!\"); } else { SendClientMessage(playerid, COLOR_GREY, \"Nincs jármu!\"); } return 1; }
public OnPlayerCommandText(playerid, cmdtext[])
if (strcmp(cmdtext, \"/lock\", true)==0) {if(IsPlayerInAnyVehicle(playerid)) {new State=GetPlayerState(playerid);if(State!=PLAYER_STATE_DRIVER) {SendClientMessage(playerid,0xFF004040,\"Csak a vezeto zárhatja le az ajtókat.\");return 1; }new i;for(i=0;i<MAX_PLAYERS;i++) {if(i != playerid) {SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1);}}SendClientMessage(playerid, 0x33AA33AA, \"Jármu zárva!\");new Float:pX, Float:pY, Float:pZ;GetPlayerPos(playerid,pX,pY,pZ);PlayerPlaySound(playerid,1056,pX,pY,pZ);} else {SendClientMessage(playerid, 0xFF004040, \"Nem vagy jármuben!\");}return 1; }if (strcmp(cmdtext, \"/unlock\", true)==0) {if(IsPlayerInAnyVehicle(playerid)) {new State=GetPlayerState(playerid);if(State!=PLAYER_STATE_DRIVER) {SendClientMessage(playerid,0xFF004040,\"Csak a vezeto tudja kinyitni az ajtókat.\");return 1; }new i;for(i=0;i<MAX_PLAYERS;i++) {SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0);}SendClientMessage(playerid, 0x33AA33AA, \"Jármu nyitva!\");new Float:pX, Float:pY, Float:pZ;GetPlayerPos(playerid,pX,pY,pZ);PlayerPlaySound(playerid,1057,pX,pY,pZ);} else {SendClientMessage(playerid, 0xFF004040, \"Nem vagy jármuben!\");}return 1; }