View Single Post
Old 05/07/2019, 08:52 PM   #9
Fuzzy
Big Clucker
 
Join Date: May 2019
Posts: 94
Reputation: 5
Default Re: How to give weapons after they choosed?

I'll give you an example

Code:
Dialog:AddNOS(playerid, response, listitem, inputtext[])
{
	new vehicleid = GetPlayerVehicleID(playerid);

	if (!IsPlayerInAnyVehicle(playerid) || !IsDoorVehicle(vehicleid))
	    return 0;

	if (response)
	{
	    switch (listitem)
	    {
	        case 0:
			{
			    AddComponent(vehicleid, 1009);
			    SendServerMessage(playerid, "You have added 2x NOS to this vehicle.");
			}
			case 1:
			{
			    AddComponent(vehicleid, 1008);
			    SendServerMessage(playerid, "You have added 5x NOS to this vehicle.");
			}
            case 2:
			{
			    AddComponent(vehicleid, 1010);
			    SendServerMessage(playerid, "You have added 10x NOS to this vehicle.");
			}
		}
	}
	return 1;
}
__________________
My Releases:
Tutorial:
Gamemode:
Fuzzy is offline   Reply With Quote