SA-MP Forums Archive
Problema cu gasirea masinile personale. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Română/Romanian (https://sampforum.blast.hk/forumdisplay.php?fid=40)
+---- Thread: Problema cu gasirea masinile personale. (/showthread.php?tid=651793)



Problema cu gasirea masinile personale. - Filip21 - 27.03.2018

Bun deci am o problema, am facut comanda vipname si problem este ca daca dai /vipname pe o masina personala spune ca nu sunt intr-una.

PHP Code:
new PlayerSlot playerVariables[playerid][VehicleSlot]; 
if(
PVeh[PlayerSlot][playerid][Vehicle] != vehicleid) return SCM(playeridCOLOR_GREY"You have to be in your personal vehicle!"); 
Nu inteleg care ar fii problema, la restrictia asta m-am luat dupa comanda /park si aia functioneaza cum trebuie...


Re: Problema cu gasirea masinile personale. - Calinut200 - 27.03.2018

Incearca sa faci ceva de genu

PHP Code:
new PlayerSlot playerVariables[playerid][VehicleSlot];  
if(
PVeh[PlayerSlot][playerid][Vehicle] != vehicleid
{
      
codu tau
}
else
{
return 
SCM(playeridCOLOR_GREY"You have to be in your personal vehicle!");  




Re: Problema cu gasirea masinile personale. - ForCop - 28.03.2018

Quote:
Originally Posted by Calinut200
View Post
Incearca sa faci ceva de genu

PHP Code:
new PlayerSlot playerVariables[playerid][VehicleSlot];  
if(
PVeh[PlayerSlot][playerid][Vehicle] != vehicleid
{
      
codu tau
}
else
{
return 
SCM(playeridCOLOR_GREY"You have to be in your personal vehicle!");  

Code:
new PlayerSlot = playerVariables[playerid][VehicleSlot];   // nu este nevoie de creat variabila daca folosesti numai odata playerVariables[playerid][VehicleSlot]
if(PVeh[PlayerSlot][playerid][Vehicle] != vehicleid)  //putem pune si aici playerVariables[playerid][VehicleSlot]
{ 
      codu tau 

} else  return SCM(playerid, COLOR_GREY, "You have to be in your personal vehicle!");



Re: Problema cu gasirea masinile personale. - Filip21 - 02.04.2018

E acelasi lucru cum am facut eu....