Hey, please help (probably simple)
#2

Just if this helps..

dcmd_lock(playerid,params[]) {
#pragma unused params
if(IsPlayerConnected(playerid,"lock")) {
if(IsPlayerInAnyVehicle(playerid)) {
for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i)) SetVehicleParamsForPlayer(GetPlayerVehicleID(playe rid),i,false,true);
new name[24]; VehicleLockData[GetPlayerVehicleID(playerid)] = true; GetPlayerName(playerid,name,24); SendClientMessage(playerid,yellow,"You have locked your car."); return 1;
} else return SendClientMessage(playerid,red,"ERROR: You must be in a vehicle to lock.");
} else return SendLevelErrorMessage(playerid,"lock");
}


dcmd_unlock(playerid,params[]) {
#pragma unused params
if(IsPlayerConnected(playerid,"unlock")) {
if(IsPlayerInAnyVehicle(playerid)) {
for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i)) SetVehicleParamsForPlayer(GetPlayerVehicleID(playe rid),i,false,false);
new name[24]; VehicleLockData[GetPlayerVehicleID(playerid)] = false; GetPlayerName(playerid,name,24); SendClientMessage(playerid,yellow,"You have unlocked your car."); return 1;
} else return SendClientMessage(playerid,red,"ERROR: You must be in a vehicle to unlock.");
} else return SendLevelErrorMessage(playerid,"unlock");
}

also I changed this at the top.


dcmd(lock,5,cmdtext);
dcmd(unlock,7,cmdtext);
Reply


Messages In This Thread
Hey, please help (probably simple) "added a new question at the buttom" :p - by master2466 - 13.03.2013, 22:10
Re: Hey, please help (probably simple) - by master2466 - 13.03.2013, 22:15
Re: Hey, please help (probably simple) - by Private200 - 13.03.2013, 22:17
AW: Hey, please help (probably simple) - by NaS - 13.03.2013, 22:17
Re: Hey, please help (probably simple) - by master2466 - 13.03.2013, 22:19
Re: AW: Hey, please help (probably simple) - by Private200 - 13.03.2013, 22:20
Re: Hey, please help (probably simple) - by Patrick - 13.03.2013, 22:20
AW: Re: AW: Hey, please help (probably simple) - by NaS - 13.03.2013, 22:21
Re: AW: Hey, please help (probably simple) - by master2466 - 13.03.2013, 22:21
Re: Hey, please help (probably simple) - by master2466 - 13.03.2013, 22:34

Forum Jump:


Users browsing this thread: 1 Guest(s)