[SOLVED] Lock/Unlock - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [SOLVED] Lock/Unlock (
/showthread.php?tid=88227)
[SOLVED] Lock/Unlock -
BP13 - 25.07.2009
my lock / unlock scripts that I get usually only 50% of the time work people still jack me. im not sure if its that car jack hack or just some bad scripting.
Re: Lock/Unlock -
evilmidget95 - 25.07.2009
I HOPE THAT FAT PIZZA BOY DON_CORRELLI POSTS AFTER HE MAKES HIS SPAGHETTI
Re: Lock/Unlock -
abhinavdabral - 25.07.2009
I hope this code will work for you...Paste this inside OnPlayerCommandText
pawn Код:
if(!strcmp(cmdtext,"/lock",true,5)) {
new carid;
if (IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid)==PLAYER_STATE_DRIVER) {
GameTextForPlayer(playerid,"~r~LOCKED !",1000,1);
carid=GetPlayerVehicleID(playerid);
new i;
for (i=0;i<MAX_PLAYERS;i++){
if (i!=playerid) SetVehicleParamsForPlayer(carid,i,0,1);
}
return 1;
}
else
{
SendClientMessage(playerid, COLOR_ERROR, "ERROR : You need to be in a vehicle that you want to be unlocked.");
return 1;
}
}
if(!strcmp(cmdtext,"/unlock",true,7)) {
new carid;
if (IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid)==PLAYER_STATE_DRIVER) {
carid=GetPlayerVehicleID(playerid);
GameTextForPlayer(playerid,"~g~UNLOCKED !",1000,1);
new i;
for (i=0;i<MAX_PLAYERS;i++){
if (i!=playerid) SetVehicleParamsForPlayer(carid,i,0,0);
}
return 1;
}
else
{
SendClientMessage(playerid, COLOR_ERROR, "ERROR : You need to be in a vehicle as a driver that you want to be unlocked.");
return 1;
}
}
Re: Lock/Unlock -
BP13 - 25.07.2009
many thanks it works!
Re: Lock/Unlock -
abhinavdabral - 25.07.2009
No Problem... Anytime ........ Please chnage the topic Name to
[SOLVED] Lock/Unlock System
Thank You
-Abhinav
Re: Lock/Unlock -
BP13 - 25.07.2009
Quote:
Originally Posted by ۞●•λвнiиаv•●۞
No Problem... Anytime ........ Please chnage the topic Name to [SOLVED] Lock/Unlock System
Thank You
-Abhinav
|
ok np. Ill ask you if I need further help in scripting! thank you
Re: [SOLVED] Lock/Unlock -
abhinavdabral - 25.07.2009
I will always be cheerful to help.