/drag?
#1

i am trying to make drag command but i just make test command if it will put myselft in vehicle , bu when i compile i get error as allways

here is OnPlayerEnterVehicle

i try something like this :

Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
  Car[playerid] = GetPlayerVehicleID(playerid); // Car That was player lasted in
  return 1;
}
and here is test command

Код:
COMMAND:drag(playerid,params[])
{
	PutPlayerInVehicle(playerid,Car,3); ------------------------> ERROR LINE
	return 1;
}
and error

Код:
C:\Documents and Settings\samp\Desktop\Server2\gamemodes\RP.pwn(597) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
how i can make this /drag command ? Just the start of command
Reply
#2

Whats The 597 Line?
Reply
#3

good Question ^^

Код:
PutPlayerInVehicle(playerid,Car,3);
Reply
#4

pawn Код:
PutPlayerInVehicle(playerid,Car[playerid],3);
Reply
#5

uf u fix alot of my errors ty but

here is new one just one

Код:
COMMAND:drag(playerid,params[])
{
	if(GetPlayerVehicleID == Car) -------------------> Error Line
	{
	PutPlayerInVehicle(playerid,Car[playerid],3);
	return 1;
	}
	return 1;
}
error line:

Код:
if(GetPlayerVehicleID == Car)
and error

Код:
C:\Documents and Settings\samp\Desktop\Server2\gamemodes\RP.pwn(597) : error 076: syntax error in the expression, or invalid function call
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#6

You think this line is correct?

Anyway it's GetPlayerVehicleID(playerid)
Reply
#7

https://sampwiki.blast.hk/wiki/Main_Page
Reply
#8

uf guys u help me alot but 1 more problem now if fix those errors ofc with ur help , now the problem is that the command dont have effect, its ok there are no errors in script or warnings but when i enter car, and exit than i try the command and wont pull the player in the lastest drived car ? what should be wrong ?

here is just test command + onplayerentervehicle

Код:
COMMAND:drag(playerid,params[])
{
	if(GetPlayerVehicleID(playerid) == Car[playerid])
	{
	PutPlayerInVehicle(playerid,Car[playerid],3);
	return 1;
	}
	return 1;
}
	
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
  Car[playerid] = GetPlayerVehicleID(playerid); // Car That was player lasted in
  return 1;
}
Reply
#9

Quote:

CreateVehicle(Car, 0.0, 0.0, 0.0, 1, 1, 10000);
PutPlayerInVehicle(playerid, Car, 0);

Reply
#10

Remove the GetPlayerVehicleID check

pawn Код:
COMMAND:drag(playerid,params[])
{
    PutPlayerInVehicle(playerid,Car[playerid],3);
    return 1;
}
And also

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    Car[playerid] = vehicleid; // Car That was player lasted in
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: