/drag? - 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: /drag? (
/showthread.php?tid=122188)
/drag? -
Lajko1 - 20.01.2010
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
Re: /drag? -
GforceNL - 20.01.2010
Whats The 597 Line?
Re: /drag? -
Lajko1 - 20.01.2010
good Question ^^
Код:
PutPlayerInVehicle(playerid,Car,3);
Re: /drag? -
MadeMan - 20.01.2010
pawn Код:
PutPlayerInVehicle(playerid,Car[playerid],3);
Re: /drag? -
Lajko1 - 20.01.2010
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.
Re: /drag? -
MadeMan - 20.01.2010
You think this line is correct?
Anyway it's GetPlayerVehicleID(playerid)
Re: /drag? -
DSK_Vyorel - 20.01.2010
https://sampwiki.blast.hk/wiki/Main_Page
Re: /drag? -
Lajko1 - 21.01.2010
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;
}
Re: /drag? -
RenisiL - 21.01.2010
Quote:
CreateVehicle(Car, 0.0, 0.0, 0.0, 1, 1, 10000);
PutPlayerInVehicle(playerid, Car, 0);
|
Re: /drag? -
MadeMan - 21.01.2010
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;
}