22.02.2012, 12:27
Hey,
first: I'm German, soooo... sorry for the following "maybe" bad English ^^
okey,
i think I'm in the right area here
I made a little car license system for DTC car system,
Driving teachers can allow the licenses that a player wish to have.
The player must type a command, when he's in his car.
After this, the license text will be saved in his dtc car file like this: Kennzeichen=abc123
Now I disconnect from the server, look inside the car data. the license text is still there, everything is okey.
But now when I reconnect to the server, the licenseplate in the game is the default one.. you know.. this "XY-350" shit...
and in the car data its like this: Kennzeichen=
there is nothing... i don't know why -.-'
But i know that the license text is destroying it self when i reconnect...
now some code:
in enum dtc_playercar:
connecting:
it starts with OnPlayerCarLogin,
then it goes to PlayerCarSpawn,
hope its enough code.....
again, sorry for the bad english ^^ i'm posting this here and not in the german samp forum, because i think i get faster and more useful answers than in the german samp forum :P
MFG
CutX
first: I'm German, soooo... sorry for the following "maybe" bad English ^^
okey,
i think I'm in the right area here
I made a little car license system for DTC car system,
Driving teachers can allow the licenses that a player wish to have.
The player must type a command, when he's in his car.
After this, the license text will be saved in his dtc car file like this: Kennzeichen=abc123
Now I disconnect from the server, look inside the car data. the license text is still there, everything is okey.
But now when I reconnect to the server, the licenseplate in the game is the default one.. you know.. this "XY-350" shit...
and in the car data its like this: Kennzeichen=
there is nothing... i don't know why -.-'
But i know that the license text is destroying it self when i reconnect...
now some code:
in enum dtc_playercar:
Код:
Kennzeichen[100];
it starts with OnPlayerCarLogin,
Код:
if( strcmp( key , "Kennzeichen" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][Kennzeichen] = strval( val ); }
Код:
if(PlayerCar[playerid][Slot][Kennzeichen] != 0) {SetVehicleNumberPlate(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][Kennzeichen]); SetVehicleToRespawn(PlayerCar[playerid][Slot][CarId]); }
again, sorry for the bad english ^^ i'm posting this here and not in the german samp forum, because i think i get faster and more useful answers than in the german samp forum :P
MFG
CutX