Help with mSelection vehicles
#1

So i have made this system where they /buycar and a Textdraw pops up with all the available cars, but when they press the car they want nothing happens.

PHP Code:
public OnPlayerModelSelection(playeridresponselistidmodelid)
{
    if(
listid == carlist)
    {
        if(
response)
        {
            switch(
modelid) {
                case 
0: {
                    new 
string[128];
                    new 
playervehicleid GetPlayerFreeVehicleId(playerid);
                    
//new Float:X,Float:Y,Float:Z;
                   //GetPlayerPos(playerid,X,Y,Z);
                    
new Float:Angle;
                    
GetPlayerFacingAngle(playerid,Angle);
                    if(
GetPlayerCash(playerid) < 30000) return SendClientMessage(playeridCOLOR_WHITE"You don't have the cash for that.");
                    
GivePlayerCash(playerid, -30000);
                    
CreatePlayerVehicle(playeridplayervehicleidmodelid1729.64091896.269910.8203178.8733000);
                      
format(stringsizeof(string), " You have bought a Landstalker");
                      
SendClientMessage(playeridCOLOR_GRAD1string);
                    
VehicleSpawned[playerid] = 1;
                }
                case 
1: {
                    new 
string[128];
                    new 
playervehicleid GetPlayerFreeVehicleId(playerid);
                    
//new Float:X,Float:Y,Float:Z;
                   //GetPlayerPos(playerid,X,Y,Z);
                    
new Float:Angle;
                    
GetPlayerFacingAngle(playerid,Angle);
                    if(
GetPlayerCash(playerid) < 3000) return SendClientMessage(playeridCOLOR_WHITE"You don't have the cash for that.");
                    
GivePlayerCash(playerid, -3000);
                    
CreatePlayerVehicle(playeridplayervehicleidmodelid1729.64091896.269910.8203178.8733000);
                      
format(stringsizeof(string), " You have bought a Bravura");
                      
SendClientMessage(playeridCOLOR_GRAD1string);
                    
VehicleSpawned[playerid] = 1;
                }
            }
        }
        else 
SendClientMessage(playerid0xFF0000FF"Canceled Car Purchase");
        return 
1;
    }
    return 
1;

I am trying to make so if they press Car #1 they get fined 30k and for car #2 they get fined 3k. I am tryint to make a system like this one:
Code:
	else if(dialogid == DIALOG_SAN_CLOTHES) {
		switch(listitem) {
			case 0: {
				PlayerInfo[playerid][pSkin] = 113;
				SetPlayerSkin(playerid, 113);
			}
			case 1: {
				PlayerInfo[playerid][pSkin] = 148;
				SetPlayerSkin(playerid, 148);
			}
		}

		return 1;
	}
but with mSelection instead? Any help?
Reply
#2

Bump---
Reply
#3

In that script you only have bravura and landstalker to buy?
Reply
#4

Nevermind, Fixed it myself!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)