Case's not working.
#1

Well, I have the Case 0 and Case 1 but it only shows it 1 text... Help




Quote:

public OnGameModeInit()
{
//Misc
SetGameModeText("Gamemode DM Test Berkan");
XXX = CreateMenu("Teleports", 1, 50.0, 180.0, 200.0, 200.0);
AddMenuItem(XXX,0,"War-Ships Terrorist.");
AddMenuItem(XXX,1,"War-Ships Goverment.");


Quote:

public OnPlayerSelectedMenuRow(playerid,row)
{
new Menu:Current;
Current = GetPlayerMenu(playerid);

if(Current == XXX)
{
switch(row)
{
case 0:
{
SetPlayerPos(playerid,1515.5581,-1611.4160,892.9904);
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid, COLOR_RED, "You have been teleported to Schip T-DM, Choose a side.");
SendClientMessage(playerid, COLOR_RED, "To exit the are use ''/kill'',Or simpely die... And other thing... TAKE COVER!");
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 100000);
GivePlayerWeapon(playerid, 30, 500000);
GivePlayerWeapon(playerid, 34, 500000);
SetPlayerArmour(playerid, 100);
GivePlayerWeapon(playerid, 29, 500000);
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, COLOR_RED, "Your team is Terrorist");
SetPlayerColor(playerid, COLOR_RED);
SetPlayerSkin(playerid, 100);
}
case 1:
{
SetPlayerPos(playerid,1515.5581,-1611.4160,892.9904);
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid, COLOR_RED, "You have been teleported to Schip T-DM, Choose a side.");
SendClientMessage(playerid, COLOR_RED, "To exit the are use ''/kill'',Or simpely die... And other thing... TAKE COVER!");
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 100000);
GivePlayerWeapon(playerid, 30, 500000);
GivePlayerWeapon(playerid, 34, 500000);
SetPlayerArmour(playerid, 100);
GivePlayerWeapon(playerid, 29, 500000);
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, COLOR_RED, "Your team is Goverment");
SetPlayerColor(playerid, COLOR_BLUE);
SetPlayerSkin(playerid,287);
}
}

}

return 1;
}

Elp ?
Reply
#2

pawn Код:
AddMenuItem(XXX,0,"War-Ships Terrorist.");
AddMenuItem(XXX,0,"War-Ships Goverment.");
Use that instead. You had it set to show the other one on the other column.
Reply
#3

Thanks! Trying

EDIT: Thanks. Works...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)