hallo ich habe gerade mein erstes menu gemacht (mit hilfe vom samp wiki ^^)
aber wen ich dan /paintjob mache (und im auto bin) kommt zwar das menu aber ich kann nichts auswehln
new Menu:paintjob;
public OnGameModeInit()
...
paintjob = CreateMenu("Paintjobs", 1, 200.0, 150.0, 100.0);
AddMenuItem(paintjob, 0, "Paintjob 1");
AddMenuItem(paintjob, 0, "Paintjob 2");
AddMenuItem(paintjob, 0, "Paintjob 3");
AddMenuItem(paintjob, 0, "CJ's Head");
AddMenuItem(paintjob, 0, "Gant Brigde");
...
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:paint;
new veh;
veh = GetPlayerVehicleID(playerid);
paint = GetPlayerMenu(playerid);
if(paint == paintjob)
{
switch(row)
{
case 0:
ChangeVehiclePaintjob(veh,0);
case 1:
ChangeVehiclePaintjob(veh,1);
case 2:
ChangeVehiclePaintjob(veh,2);
case 3:
ChangeVehiclePaintjob(veh,4);
case 4:
ChangeVehiclePaintjob(veh,22);
}
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new vehicle;
vehicle = GetPlayerVehicleID(playerid);
if(!strcmp(cmdtext,"/paintjob"))
{
if(IsPlayerInVehicle(playerid, vehicle))
{
ShowMenuForPlayer(paintjob, playerid);
}
else
{
SendClientMessage(playerid,RED,"Du bist in keinem Fahrzeug!");
}
return 1;
}
return 0;
}
warum funktioniert es nicht ??