Originally Posted by Lastman
I have made player menu with the help of SAMP tutorial for changing and buying clothes. But after changing or buying clothes if i use ALT+TAB to minimize the game and then when i try to maximize the game, the game crashes. Any solution? i have made player menu for Carlitos Roleplay
![]() |
Originally Posted by MenaceX^
Quote:
|
Originally Posted by Drift_King786
wen i try making my own menu
it comes with a large list of errors, once i compile it i followed the menu tutorial, and it showed all those errors |
#include <a_samp>
new Menu:occupation;
new Menu:CurrentMenu = GetPlayerMenu(playerid);
public OnGameModeInit()
{
occupation = CreateMenu("occupation", 2, 200.0, 100.0, 150.0, 150.0);
AddMenuItem(teleportmenu, 0, "LSPD");
AddMenuItem(teleportmenu, 0, "SFPD");
AddMenuItem(teleportmenu, 0, "LVPD");
AddMenuItem(teleportmenu, 0, "BCPD");
AddMenuItem(teleportmenu, 0, "BCPD");
AddMenuItem(teleportmenu, 0, "SAPD");
AddMenuItem(teleportmenu, 1, "select");
AddMenuItem(teleportmenu, 1, "select");
AddMenuItem(teleportmenu, 1, "select");
AddMenuItem(teleportmenu, 1, "select");
AddMenuItem(teleportmenu, 1, "select");
AddMenuItem(teleportmenu, 1, "select");
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
if(CurrentMenu == occupation)
{
switch(row)
{
case 0: //LSPD
{
SetPlayerSkin( playerid, 280 );
SendClientMessage(playerid, 0xFFFFFFFF, "You are now in Los Santos Police");
}
case 1: //SFPD
{
SetPlayerSkin( playerid, 281 );
SendClientMessage(playerid, 0xFFFFFFFF, "You are now in San Fierro Police");
}
case 2: //LVPD
{
SetPlayerSkin( playerid, 282 );
SendClientMessage(playerid, 0xFFFFFFFF, "You are now in Las Venturas Police");
}
case 3: //BCPD
{
SetPlayerSkin( playerid, 283 );
SendClientMessage(playerid, 0xFFFFFFFF, "You are now in Bone County Police");
}
case 4: //BCPD
{
SetPlayerSkin( playerid, 288 );
SendClientMessage(playerid, 0xFFFFFFFF, "You are now in Bone County Police");
}
case 5: //SAPD
{
SetPlayerSkin( playerid, 284 );
SendClientMessage(playerid, 0xFFFFFFFF, "You are now in San Andreas Police");
}
}
}
return 1;
}
public OnPlayerCommandText(playerid)
}
if(strcmp(cmdtext, "/select", true) == 0)
{
ShowMenuForPlayer(occupation,playerid);
return 1;
}
#endif
new Menu:teleportmenu;
teleportmenu = CreateMenu("Teleportmenu", 2, 200.0, 100.0, 150.0, 150.0);
AddMenuItem(teleportmenu, 0, "LS"); AddMenuItem(teleportmenu, 0, "LS"); AddMenuItem(teleportmenu, 0, "SF"); AddMenuItem(teleportmenu, 0, "SF"); AddMenuItem(teleportmenu, 0, "LV"); AddMenuItem(teleportmenu, 0, "LV"); AddMenuItem(teleportmenu, 1, "Grove Street"); AddMenuItem(teleportmenu, 1, "Starfish Tower"); AddMenuItem(teleportmenu, 1, "Wheel Arch Angels"); AddMenuItem(teleportmenu, 1, "Jizzys"); AddMenuItem(teleportmenu, 1, "4 Dragons"); AddMenuItem(teleportmenu, 1, "Come-a-Lot");
new Menu:CurrentMenu = GetPlayerMenu(playerid); if(CurrentMenu == teleportmenu) { switch(row) { case 0: //Grove Street { SetPlayerPos(playerid, 2493.9133, -1682.3986, 13.3382); SetPlayerInterior(playerid, 0); SendClientMessage(playerid, 0xFFFFFFFF, "Welcome to Grove Street"); } case 1: //Starfish Tower { SetPlayerPos(playerid, 1541.2833, -1362.4741, 329.6457); SetPlayerInterior(playerid, 0); SendClientMessage(playerid, 0xFFFFFFFF, "Welcome to the top of Starfish Tower"); } case 2: //Wheel Arch Angels { SetPlayerPos(playerid, -2705.5503, 206.1621, 4.1797); SetPlayerInterior(playerid, 0); SendClientMessage(playerid, 0xFFFFFFFF, "Welcome to the Wheel Arch Angels tuning-shop"); } case 3: //Jizzys { SetPlayerPos(playerid, -2617.5156, 1390.6353, 7.1105); SetPlayerInterior(playerid, 0); SendClientMessage(playerid, 0xFFFFFFFF, "Welcome to Jizzy's Nightclub!"); } case 4: //4Dragons { SetPlayerPos(playerid, 2028.5538, 1008.3543, 10.8203); SetPlayerInterior(playerid, 0); SendClientMessage(playerid, 0xFFFFFFFF, "Welcome to the Four Dragons Casino"); } case 5: //Com-a-Lot { SetPlayerPos(playerid, 2169.1838, 1122.5426, 12.6107); SetPlayerInterior(playerid, 0); SendClientMessage(playerid, 0xFFFFFFFF, "Welcome to the Come-a-Lot casino!"); } } }
if(strcmp(cmdtext, "/teleport", true) == 0) { ShowMenuForPlayer(teleportmenu,playerid); return 1; }
public OnPlayerExitedMenu(playerid) { TogglePlayerControllable(playerid, 1); return 1; }
#include <a_samp>
new Menu:occupation;
public OnGameModeInit();
occupation = CreateMenu("occupation", 2, 200.0, 100.0, 150.0, 150.0);
AddMenuItem(occupation, 0, "LSPD");
AddMenuItem(occupation, 0, "SFPD");
AddMenuItem(occupation, 0, "LVPD");
AddMenuItem(occupation, 0, "BCPD");
AddMenuItem(occupation, 0, "BCPD");
AddMenuItem(occupation, 0, "SAPD");
AddMenuItem(occupation, 1, "select");
AddMenuItem(occupation, 1, "select");
AddMenuItem(occupation, 1, "select");
AddMenuItem(occupation, 1, "select");
AddMenuItem(occupation, 1, "select");
AddMenuItem(occupation, 1, "select");
}
return;
}
public OnPlayerSelectedMenuRow(playerid, row)
new Menu:CurrentMenu = GetPlayerMenu(playerid);
{
if(CurrentMenu == occupation)
{
switch(row)
{
case 0: //LSPD
{
SetPlayerSkin( playerid, 280 );
SendClientMessage(playerid, 0xFFFFFFFF, "You are now in Los Santos Police");
}
case 1: //SFPD
{
SetPlayerSkin( playerid, 281 );
SendClientMessage(playerid, 0xFFFFFFFF, "You are now in San Fierro Police");
}
case 2: //BCPD
{
SetPlayerSkin( playerid, 282 );
SendClientMessage(playerid, 0xFFFFFFFF, "You are now in Las Venturas Police");
}
case 3: //BCPD
{
SetPlayerSkin( playerid, 283 );
SendClientMessage(playerid, 0xFFFFFFFF, "You are now in Bone County Police");
}
case 4: //BCPD
{
SetPlayerSkin( playerid, 288 );
SendClientMessage(playerid, 0xFFFFFFFF, "You are now in Bone County Police");
}
case 5: //SAPD
{
SetPlayerSkin( playerid, 284 );
SendClientMessage(playerid, 0xFFFFFFFF, "You are now in San Andreas Police");
}
}
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/select", true) == 0)
{
ShowMenuForPlayer(occupation, playerid);
return;
}
}
public OnPlayerExitedMenu(playerid)
{
TogglePlayerControllable(playerid, 1);
return 1;
}
#endif
(10) : error 010: invalid function or declaration (24) : error 010: invalid function or declaration (28) : error 003: declaration of a local variable must appear in a compound block (30) : error 010: invalid function or declaration (32) : error 010: invalid function or declaration (34) : error 010: invalid function or declaration (39) : error 010: invalid function or declaration (44) : error 010: invalid function or declaration (49) : error 010: invalid function or declaration (54) : error 010: invalid function or declaration (59) : error 010: invalid function or declaration (66) : error 010: invalid function or declaration (82) : error 026: no matching "#if..." Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 13 Errors.