whats wrong with this ? It seems taht it is not working .. - 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: whats wrong with this ? It seems taht it is not working .. (
/showthread.php?tid=148568)
whats wrong with this ? It seems taht it is not working .. -
AlbanianGuy - 17.05.2010
Код:
public OnPlayerDisconnect(playerid,reason)
{
if(PlayerInAnyVehicle(playerid)
{
dUserSetINT(PlayerName(playerid)).("car",1);
dUserSetINT(PlayerName2(playerid)).("Thecar",GetPlayerVehicleID(playerid));
}
}
onplayerspawn(playerid)
{
if(dUserSetINT(PlayerName(playerid)).("car") == 1)
{
PutPlayerInVehicle(playerid,(dUserSetINT(PlayerName2(playerid)).("Thecar"),0);
}
}
Now when i see the saved folder .... it shows as the vehicleid 1 .. nothing else ... it is supose to show the vehicle id ... but instead it shows 1 ... whats the problem ?
Re: whats wrong with this ? It seems taht it is not working .. -
Babul - 17.05.2010
Код:
dUserSetINT(PlayerName2(playerid)).("Thecar",GetVehicleModel(GetPlayerVehicleID(playerid)));
Re: whats wrong with this ? It seems taht it is not working .. -
AlbanianGuy - 18.05.2010
well i it does save the vehicle id but it wont sapwn and put the player in the car ... now i have added this..
Код:
if (dUserINT(PlayerName2(playerid)).("Vehicleid") == 1) {
new Float:X,Float:Y,Float:Z, Float:Angle; GetPlayerPos(playerid, X,Y,Z); GetPlayerFacingAngle(playerid,Angle);
PutAtPosition(playerid);
dUserINT(PlayerName(playerid)).("Thecar") = CreateVehicle(GetVehicleModel(GetPlayerVehicleID(playerid)), X+3,Y,Z, Angle, 2, 2, -1);//line 1744
PutPlayerInVehicle(playerid,dUserINT(PlayerName(playerid)).("Thecar"),0);
return 1;
}
and i get this error
Код:
.pwn(1744) : error 022: must be lvalue (non-constant)