Public feed
#890509
if (strcmp(cmdtext, "/lock", true)==0){
new State=GetPlayerState(playerid);
if(State!=PLAYER_STATE_DRIVER){
SendClientMessage(playerid,COLOR_GREY,"You can only lock the doors as the driver.");
return 1;
}
new i;
for(i=0;i<MAX_PLAYERS;i++){
if(i != playerid)
{
SetVehicleParamsForPlayer(GetPlayerVehicleID(i),i, 0, 1);
}
}
SendClientMessage(playerid, COLOR_GREEEN, "You Lock All Car Doors!");
new Float:pX, Float:pY, Float:pZ;
GetPlayerPos(playerid,pX,pY,pZ);
PlayerPlaySound(playerid,1056,pX,pY,pZ);
}
return 1;
}
//-----
if (strcmp(cmdtext, "/unlock", true)==0){
new State=GetPlayerState(playerid);
if(State!=PLAYER_STATE_DRIVER){
SendClientMessage(playerid, COLOR_GREY,"You can only unlock the doors as the driver.");
return 1;
}
new i;
for(i=0;i<MAX_PLAYERS;i++){
SetVehicleParamsForPlayer(GetPlayerVehicleID(i),i, 0, 0);
}0
SendClientMessage(playerid, COLOR_GREEEN, " You Un Lock The Car");
new Float:pX, Float:pY, Float:pZ;
GetPlayerPos(i,pX,pY,pZ);
}
return 1;
}