01.03.2010, 10:34
My cars get locked sometimes and i heard i have to repeat my /lock under onvehiclestreamin but i dont know how.
Код:
//---------------------------------------------------------------------------------------- if (strcmp(cmdtext, "/lock", true)==0) { if(IsPlayerInAnyVehicle(playerid)) { new State; new Float:X, Float:Y, Float:Z; State=GetPlayerState(playerid); if(State!=PLAYER_STATE_DRIVER) { SendClientMessage(playerid,GREY,"You are not on the driver seet."); return 1; } new i; for(i=0;i<MAX_PLAYERS;i++) { if(i != playerid) { SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1); } } SendClientMessage(playerid, GREY, "[VEHICLE] Locked."); GetPlayerPos(playerid,X,Y,Z); PlayerPlaySound(playerid,1056,X,Y,Z); } else { SendClientMessage(playerid, GREY, "You're not in a vehicle!"); } return 1; }