Pizza not work - 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: Pizza not work (
/showthread.php?tid=654879)
Pizza not work -
Auri - 08.06.2018
Hi, I created a command / pizza which does not work properly, I mean here that gives checkpoint but I do not get a vehicle which is signed for the group.
Should first download whether we are in the vehicle and then show what's next.
Код:
CMD:pizza(playerid, cmdtext[])
{
if(CharacterInfo[playerid][pJob] != JOB_PIZZABOY) return 1;
new v=GetPlayerVehicleID(playerid);
if(VehicleInfo[v][vOwnerTyp] == OWNER_DORYWCZE && VehicleInfo[v][vOwner] == JOB_PIZZABOY)
return Tip(playerid,5,"~y~Take vehicle pizzaboy.");
new los=random(2);
switch(los)
{
case 0:
{
SetPlayerCheckpoint(playerid,-2196.0913,-2508.2332,30.5226, 3.0);
Tip(playerid,5,"~y~Go to checkpoint.");
return 1;
}
case 1:
{
SetPlayerCheckpoint(playerid,-2077.5425,-2546.7212,30.2229, 3.0);
Tip(playerid,5,"~y~Go to checkpoint.");
return 1;
}
case 2:
{
SetPlayerCheckpoint(playerid,-2004.6647,-2411.2637,30.2240, 3.0);
Tip(playerid,5,"~y~Go to checkpoint.");
return 1;
}
}
return 1;
}
Re: Pizza not work -
jasperschellekens - 08.06.2018
Well you Dont create a vehicle in your command so Where do u think the veh Will come from? You can spawn a pizza fiaggio and put the player in it. Your script doesnt give a vehicle But checks the players current vehicle
Re: Pizza not work -
Auri - 08.06.2018
My veh is in a database and load with base.
Re: Pizza not work -
jasperschellekens - 08.06.2018
Can u please be more clear of what the problem is here?
You told in your thread that the problem is that you wont get a vehicle after using the cmd right?
You told you don't get the vehicle. How is the vehicle supposed to be given to you when there isnt a single line of code that spawns a veh? Please describe your problem more clearly, use a translator if necessary because with the very little info you provided we cant really help you.
Start with answering this question: Does the command have to put the player in a vehicle? or does it have to check if the player is driving the vehicle?