SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 17/05/2010, 09:53 PM   #1
AlbanianGuy
Huge Clucker
 
Join Date: Oct 2009
Posts: 211
Reputation: 0
Default whats wrong with this ? It seems taht it is not working ..

Code:
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 ?
AlbanianGuy is offline  
Old 17/05/2010, 10:11 PM   #2
Babul
High-roller
 
Babul's Avatar
 
Join Date: Sep 2009
Location: in a cement block
Posts: 1,893
Reputation: 251
Default Re: whats wrong with this ? It seems taht it is not working ..

Code:
dUserSetINT(PlayerName2(playerid)).("Thecar",GetVehicleModel(GetPlayerVehicleID(playerid)));
__________________
FireWorks

new sscanf2 custom specifiers available for Download, read the Release Topic
Babul is offline  
Old 18/05/2010, 02:19 AM   #3
AlbanianGuy
Huge Clucker
 
Join Date: Oct 2009
Posts: 211
Reputation: 0
Default Re: whats wrong with this ? It seems taht it is not working ..

well i it does save the vehicle id but it wont sapwn and put the player in the car ... now i have added this..
Code:
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
Code:
.pwn(1744) : error 022: must be lvalue (non-constant)
AlbanianGuy is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Whats wrong with this? hardstop Help Archive 7 15/05/2010 09:19 AM
Whats wrong? Torran Help Archive 3 05/05/2010 10:17 AM
whats going wrong ? Peter_Parker Help Archive 15 16/04/2010 06:57 PM
whats wrong here? CJ101 Help Archive 2 29/03/2009 12:00 AM
Whats wrong here? WanabePC Help Archive 6 20/03/2009 07:44 PM


All times are GMT. The time now is 01:45 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.