/lock Command dont work..
#6

Quote:
Originally Posted by teomakedonija
View Post
if(strcmp(cmd, "/lock", true) == 0)
{
if(PlayerConnected(playerid))
#pragma unused params
new engine, lights, alarm, doors, bonnet, boot, objective, string[128];
if(Player[playerid][PlayerCarModel] > 0)
{
if(IsPlayerInRangeOfVehicle(playerid, Player[playerid][CarLinkID], 10))
{
if(Player[playerid][CarLinkID] > 0)
{
if(Player[playerid][LockedCar] == 0)
{
Player[playerid][LockedCar] = 1;
format(string, sizeof(string), "%s has locked their vehicle");
NearByMessage(playerid, PURPLE, string);

for(new i = 0; i < MAX_PLAYERS; i++)
{
if(i != playerid)
{
GetVehicleParamsEx(Player[playerid][CarLinkID], engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(Player[playerid][CarLinkID], engine, lights, alarm, 1, bonnet, boot, 0);
}
}
return 1;
}
else
{
Player[playerid][LockedCar] = 0;
format(string, sizeof(string),"%s has unlocked their vehicle");
NearByMessage(playerid, PURPLE, string);

for(new i = 0; i < MAX_PLAYERS; i++)
{
GetVehicleParamsEx(Player[playerid][CarLinkID], engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(Player[playerid][CarLinkID], engine, lights, alarm, 0, bonnet, boot, 0);

}
}
}
else
{
SendClientMessage(playerid, WHITE, "You do not own a car");
}
}
else
{
SendClientMessage(playerid, WHITE, "You are not near any of your vehicles");
}
}
return 1;
}
That is pretty much all i have got at the minute, You pretty much just copied and pasted my script, Im asking how could i make it so when im near car 2 and i do /lock it locks/unlocks it or when im near car 3...
Reply


Messages In This Thread
/lock Command dont work.. - by Geniuss - 01.06.2012, 15:51
Re: /lock Command dont work.. - by Sandiel - 01.06.2012, 16:17
Re: /lock Command dont work.. - by Geniuss - 01.06.2012, 16:20
Re: /lock Command dont work.. - by teomakedonija - 01.06.2012, 16:22
Re: /lock Command dont work.. - by Sandiel - 01.06.2012, 16:25
Re: /lock Command dont work.. - by Geniuss - 01.06.2012, 16:25
Re: /lock Command dont work.. - by Geniuss - 01.06.2012, 16:29
Re: /lock Command dont work.. - by Geniuss - 01.06.2012, 16:54
Re: /lock Command dont work.. - by Geniuss - 01.06.2012, 18:14

Forum Jump:


Users browsing this thread: 1 Guest(s)