Public feed #378910

Someone

public text v1 · immutable
Raw Edit
·published 2007-03-02 21:36 UTC
rendered paste body
if (strcmp(cmdtext, "/unlock", true)==0) {
     if(IsPlayerInAnyVehicle(playerid)) {
          new State=GetPlayerState(playerid);
          if(State!=PLAYER_STATE_DRIVER) {
               SendClientMessage(playerid,0xFFFF00AA,"You can only unlock the doors as the driver.");
               return 1;
          }
          for(new i=0; i<MAX_PLAYERS; i++) {
               SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0);
          }
          SendClientMessage(playerid, 0xFFFF00AA, "Vehicle unlocked!");
          new Float:pX, Float:pY, Float:pZ;
          GetPlayerPos(playerid,pX,pY,pZ);
          PlayerPlaySound(playerid,1057,pX,pY,pZ);
     } else {
          SendClientMessage(playerid, 0xFFFF00AA, "You're not in a vehicle!");
     }
     return 1;
}
/*          } here's an extra closing brace, which closes your OnPlayerCommandText function
 359.
      }else{ and here's a floating else with no if, looks like you chopped off half of the registering commands
 360.
      SendClientMessage(playerid, COLOR_GREEN, "*** Login or register now.");
 361.
      }*/