whats wrong with this ? It seems taht it is not working ..
#1

Код:
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 ?
Reply
#2

Код:
dUserSetINT(PlayerName2(playerid)).("Thecar",GetVehicleModel(GetPlayerVehicleID(playerid)));
Reply
#3

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)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)