[Help] /lock
#1

Hello.

I have a problem with this command..

the problem is that it locks every car even if you dont own it. and its locking only if you're in the car and not in the Distance 5 of it.

Код:
if(strcmp(cmd, "/lock", true) == 0)
		{new plyName[MAX_PLAYER_NAME];
		GetPlayerName(playerid, plyName, MAX_PLAYER_NAME);
		if(strcmp(VehicleSystem[GetCreatorID(vehicleid)][owner],plyName,true) == 0)
		{
		new dist = CheckPlayerDistanceToVehicle(5, playerid, vehicleid);
		if(dist)
		{
		PlayerActionMessage(playerid,15.0,"locks the vehicle.");
 		}
		else
		{
 		SendClientMessage(playerid,COLOR_GREY,"You're not near your vehicle!");
 		}}
		else
		{
 		SendClientMessage(playerid,COLOR_GREY,"This is not your vehicle.");
 		}
		return 1;
		}
Reply


Messages In This Thread
[Help] /lock - by [Sk]Noob - 07.04.2010, 21:41
Re: [Help] /lock - by ducati09 - 08.04.2010, 00:20
Re: [Help] /lock - by [Sk]Noob - 08.04.2010, 04:04
Re: [Help] /lock - by [Sk]Noob - 08.04.2010, 13:43
Re: [Help] /lock - by [Sk]Noob - 08.04.2010, 14:31

Forum Jump:


Users browsing this thread: 1 Guest(s)