[SOLVED]
#1

Hey guy's i've seen the TUT on how to make Private Vehicles for players

So i tryed making it..

But my script gets some errors

Please reply if you can fix them thanks alot.


Heres my code and the errors:



Code:
Код:
#include <a_samp>

new Privatecar;


public OnFilterScriptInit()
{
	Privatecar = AddStaticVehicle(411,1094.9409,1227.7343,10.5474,359.7017,63,10); // Jays Car.
  return 1;
}

public OnPlayerStateChange(playerid,newstate, oldstate)
{
	 new vehicleid = GetPlayerVehicleID(playerid);
	 new pname[MAX_PLAYER_NAME];
	 
	 GetPlayerName(playerid,pname,sizeof pname);
	 
	 if (newstate == PLAYER_STATE_DRIVER)
	 {
		if vehicleid == Privatecar)
		{
		 if(strcmp(pname,"Jay",true) ==0)
		 {
		 
		   return 1;
		 }
		 else
		 {
			 RemovePlayerFromVehicle(playerid);
		 }
		}
	 }
   return 1;
}

Код:
Errors:
C:\Users\(lewis)\Desktop\New Folder (4)\CarV.pwn(21) : error 001: expected token: "*then", but found ")"
C:\Users\(lewis)\Desktop\New Folder (4)\CarV.pwn(21) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.







Reply
#2

pawn Код:
if(vehicleid == Privatecar)
Not

pawn Код:
if vehicleid == Privatecar)
Reply
#3

Quote:
Originally Posted by Torran
pawn Код:
if(vehicleid == Privatecar)
Not

pawn Код:
if vehicleid == Privatecar)
Ah fixed thanks..!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)