Car Sys Problem - 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)
+--- Thread: Car Sys Problem (
/showthread.php?tid=499932)
Car Sys Problem -
blackfire49 - 10.03.2014
Hello
I am trying to make a Car System, Car Shop is working but if i wan`t to ask if the User is the Owner it doesn`t work
All user cars will load on Server start and will be Saved all 30 min. So if player wants to lock his Car and type /lock the Server needs to check if user is owner, thats why i made a stock with the name isPlayerCar
Here how its looks
Код:
stock isPlayerCar(playerid)
{
new vehid;
vehid = GetPlayerVehicleID(playerid);
if(!strcmp(pCar[vehid][Owner],PlayerName(playerid),false)) return 1;
return 0;
}
So but for some reason if i enter a Vehicle he says iam Owner. the debug says Carid: 16, PlayerCar: 0 and thats wrong
here the enums and news
Код:
enum PlayerCarData
{
ModelID,
Owner[MAX_PLAYER_NAME],
Float:posx,
Float:posy,
Float:posz,
Float:posa,
Color1,
Color2,
Price,
Key
}
new pCar[MAX_VEHICLES][PlayerCarData];
Now my Question: How can i Ask if User is Owner of the Car
Sorry for my bad English ^^