SA-MP Forums Archive
Car Surfing Script - 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)
+--- Thread: Car Surfing Script (/showthread.php?tid=440512)



Car Surfing Script - Jay_Dixon - 30.05.2013

Ok, i don't see the error here. Was hoping you guys might know what's up with this

Код:
C:\Users\Jay\Desktop\FRP\gamemodes\FRP.pwn(4253) : error 036: empty statement
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Код:
	new string[256];
	new playername[MAX_PLAYER_NAME];
	new Float:x, Float:y, Float:z;
	GetPlayerName(playerid, playername, sizeof(playername));
	if(GetPlayerSurfingVehicleID(playerid) !=5);//Making sure they aren't surfing another vehicle.
	{
	    GetPlayerPos(playerid, x, y, z);
		format(string, sizeof(string), "* %s loses %s grip and falls off the vehicle.",PlayerName(playerid),HisHer(playerid));
		ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
		SetPlayerPos(playerid, x+3, y+3, z+1);
		PlayerPlaySound(playerid, 1130, 0.0, 0.0, 0.0);
	}



Re: Car Surfing Script - Lorenc_ - 30.05.2013

Код:
if(GetPlayerSurfingVehicleID(playerid) !=5);//Making sure they aren't surfing another vehicle.
Remove the semi-colon there and it should work.


Re: Car Surfing Script - Jay_Dixon - 30.05.2013

Quote:
Originally Posted by Lorenc_
Посмотреть сообщение
Код:
if(GetPlayerSurfingVehicleID(playerid) !=5);//Making sure they aren't surfing another vehicle.
Remove the semi-colon there and it should work.
Thanks, it worked =3


Re: Car Surfing Script - Pottus - 30.05.2013

You could make this code a lot better by adding a velocity check and only knocking the player off when a vehicle is going a certain speed.