SA-MP Forums Archive
Help please. - 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: Help please. (/showthread.php?tid=160420)



Help please. - RatHack - 16.07.2010

Hi

i want a FS with, when i type in my server /lock (for lock the vehicle)

in the vehicle says 'Vehicle locked by: (name)', and nobody can enter.


Re: Help please. - DJDhan - 16.07.2010

Search the WIKI next time.

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(!strcmp(cmdtext,"/lock",true)) 
    	{
        		if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFFFFFFAA,"You have to be inside a vehicle.");
        		for(new i=0; i < MAX_PLAYERS; i++)
        		{
            			if(i == playerid) continue;
            			SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i,0,1);
        		}
        		return 1;
    	}
    	return 0;
}



Re: Help please. - RatHack - 16.07.2010

Ok, thx i'll try