CAR MENU HELP
#1

this dose not seem to actualy spawn the car it nows if im in a car and when i buy it it tells me i have but it dont spawn the car any reason why ? im abignoob at this so plz dontbe harsh .

//=======================[ The Bit of car skript ]================================================== ========================
if(CurrentMenu == Vehicles)
{
switch(row)
{
case 0:
{
TogglePlayerControllable(playerid,1);
if (GetPlayerMoney(playerid) >= 4000)
{
if(IsPlayerInAnyVehicle(playerid))
{
ShowMenuForPlayer(Vehicles,playerid);TogglePlayerC ontrollable(playerid, 0);
SendClientMessage(playerid, 0x33AA33AA, "You are already in a vehicle");
return 1;
}
else
{

GetPlayerPos(playerid,x,y,z);
GetPlayerFacingAngle(playerid,a);
CreateVehicle(411,x+1,y+1,z+2,a,0,1,130);
PutPlayerInVehicle(playerid, vehicleid2, 0);
GivePlayerMoney(playerid, -4000);
SendClientMessage(playerid,COLOR_WHITE,"[SUCCESS]> You bought an Infernus for 4000$");
}
}
else
{
ShowMenuForPlayer(Vehicles,playerid);TogglePlayerC ontrollable(playerid, 0);
SendClientMessage(playerid, COLOR_ULTRARED, "You don't have enough moneys! You need 4200$.");
return 1;
}
}
Reply
#2

{pawn}{/pawn} Use those pawn tags next time except there are suppose to be []'s, not {}'s

Anyways, try this:
pawn Код:
vehicleid2=CreateVehicle(411,x+1,y+1,z+2,a,0,1,130);
PutPlayerInVehicle(playerid, vehicleid2, 0);
Also, did you get the message that you bought the Infernus for $4000?, If not, that section of the code is not being triggered, my above solution just assumes the script is being triggered at the very least :P
Reply
#3

Il try thankz
Reply
#4

Yes thank you this worked
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)