SA-MP Forums Archive
spawning vehicles in blueberry - 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: spawning vehicles in blueberry (/showthread.php?tid=625136)



spawning vehicles in blueberry - Jumberi - 28.12.2016

i know what is problem but i cant solve this

new price = GetVehiclePrice(modelid);
new Float:ParkX, Float:ParkY, Float:ParkZ;
new name[64];
if(GetCash(playerid) < price) return NoCashMSG(playerid);
GiveCash(playerid, -price);
name = GetName(playerid);
new slot = GetNextPlayerVehSlot(playerid);
if(IsABoatModel(modelid))
{
ParkX = 310.3268;
ParkY = -1941.7601;
ParkZ = 1.3952;
}
if(IsAPlaneModel(modelid))
{
ParkX = 1943.5498;
ParkY = -2397.6553;
ParkZ = 13.5469;
}
if(IsAFarmerModel(modelid))
{
ParkX = -329.681;
ParkY = -1427.7;
ParkZ = 16.0862;
}
else

i cant find model of owned vehicles please help me with this


Re: spawning vehicles in blueberry - aymane123 - 28.12.2016

Make Ur Log As Bbcodes format to make it more undertsandable


Re: spawning vehicles in blueberry - Jumberi - 28.12.2016

Quote:
Originally Posted by aymane123
Посмотреть сообщение
Make Ur Log As Bbcodes format to make it more undertsandable
Код:
new price = GetVehiclePrice(modelid);
new Float:ParkX, Float:ParkY, Float:ParkZ;
new name[64];
if(GetCash(playerid) < price) return NoCashMSG(playerid);
GiveCash(playerid, -price);
name = GetName(playerid);
new slot = GetNextPlayerVehSlot(playerid);
if(IsABoatModel(modelid))
{
ParkX = 310.3268;
ParkY = -1941.7601;
ParkZ = 1.3952;
}
if(IsAPlaneModel(modelid))
{
ParkX = 1943.5498;
ParkY = -2397.6553;
ParkZ = 13.5469;
}
if(IsAFarmerModel(modelid))
{
ParkX = -329.681;
ParkY = -1427.7;
ParkZ = 16.0862;
}
else



Re: spawning vehicles in blueberry - ChristolisTV - 28.12.2016

Can you show the IsABoatModel(), IsAPlaneModel(modelid), IsAFarmerModel(modelid) stocks?


Re: spawning vehicles in blueberry - Jumberi - 28.12.2016

Quote:
Originally Posted by ChristolisTV
Посмотреть сообщение
Can you show the IsABoatModel(), IsAPlaneModel(modelid), IsAFarmerModel(modelid) stocks?
look , Boat Plane and Farmer models spawning correclty but other vehicles like majestic , elegy and much more spawning in blueberry..


Re: spawning vehicles in blueberry - ChristolisTV - 28.12.2016

I don't think if this is gonna work:

PHP код:
new price GetVehiclePrice(modelid);
new 
Float:ParkXFloat:ParkYFloat:ParkZ;
new 
name[64];
if(
GetCash(playerid) < price) return NoCashMSG(playerid);
GiveCash(playerid, -price);
name GetName(playerid);
new 
slot GetNextPlayerVehSlot(playerid);
if(
IsABoatModel(modelid))
{
   
ParkX 310.3268;
   
ParkY = -1941.7601;
   
ParkZ 1.3952;
} else
if(
IsAPlaneModel(modelid))
{
   
ParkX 1943.5498;
   
ParkY = -2397.6553;
   
ParkZ 13.5469;
} else
if(
IsAFarmerModel(modelid))
{
   
ParkX = -329.681;
   
ParkY = -1427.7;
   
ParkZ 16.0862;
}
else
//Put your coords here.
   
ParkX 0.0;
   
ParkY 0.0;
   
ParkZ 0.0;




Re: spawning vehicles in blueberry - Jumberi - 28.12.2016

Quote:
Originally Posted by ChristolisTV
Посмотреть сообщение
I don't think if this is gonna work:

PHP код:
new price GetVehiclePrice(modelid);
new 
Float:ParkXFloat:ParkYFloat:ParkZ;
new 
name[64];
if(
GetCash(playerid) < price) return NoCashMSG(playerid);
GiveCash(playerid, -price);
name GetName(playerid);
new 
slot GetNextPlayerVehSlot(playerid);
if(
IsABoatModel(modelid))
{
   
ParkX 310.3268;
   
ParkY = -1941.7601;
   
ParkZ 1.3952;
} else
if(
IsAPlaneModel(modelid))
{
   
ParkX 1943.5498;
   
ParkY = -2397.6553;
   
ParkZ 13.5469;
} else
if(
IsAFarmerModel(modelid))
{
   
ParkX = -329.681;
   
ParkY = -1427.7;
   
ParkZ 16.0862;
}
else
//Put your coords here.
   
ParkX 0.0;
   
ParkY 0.0;
   
ParkZ 0.0;

Код:
(21542) : error 029: invalid expression, assumed zero



Re: spawning vehicles in blueberry - Jumberi - 29.12.2016

Hey? anyone can help me?


Re: spawning vehicles in blueberry - ChristolisTV - 29.12.2016

Can you show me where is the error line? :P

EDIT: I think your error line is here:
PHP код:
name GetName(playerid); 
I recommend doing this:

PHP код:
GetPlayerName(playeridpNamesizeof(pName)); 



Re: spawning vehicles in blueberry - Jumberi - 29.12.2016

no its not working , can you help me??


Re: spawning vehicles in blueberry - ChristolisTV - 29.12.2016

Read my previous post, I made an edit.


Re: spawning vehicles in blueberry - Jumberi - 29.12.2016

Код:
error 017: undefined symbol "pName"
gamemodes\ss-rp.pwn(21517) : error 017: undefined symbol "pName"
\gamemodes\ss-rp.pwn(21517) : error 029: invalid expression, assumed zero
\ss-rp.pwn(21517) : fatal error 107: too many error messages on one line
add me in skype avto_mela1