''Else'' help.
#1

Quote:

if(!strcmp(cmdtext, "/pguns", true))
{
{
if(IsPlayerInRangeOfPoint(playerid, 4.0, -1560.4093, 778.7145, -74.6000))
{
SendClientMessage(playerid,0xFFFFFFFF,"You are near the Stadium entrance!");
GameTextForPlayer(playerid,"~b~Police ~g~menu",4000,4);
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "SFPD Weapons Armory", "Desert Eagle \nMP5 \nM4 \nPolice Baton \nArmour \nSniper \nSpray ", "Use", "Cancel");
else
{
SendClientMessage(playerid,0xFFFFFFFF,"You are not at the police armory!");
GameTextForPlayer(playerid,"~r~ERROR",4000,4);
}
return 1;
}

No worky
Reply
#2

If you were to properly INDENT your code you would notice a missing brace in an eye's blink.
Reply
#3

Try this. + i fixed your indentation

pawn Код:
if(!strcmp(cmdtext, "/pguns", true))
{
    if(IsPlayerInRangeOfPoint(playerid, 4.0, -1560.4093, 778.7145, -74.6000))
    {
        SendClientMessage(playerid,0xFFFFFFFF,"You are near the Stadium entrance!");
        GameTextForPlayer(playerid,"~b~Police ~g~menu",4000,4);
        ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "SFPD Weapons Armory", "Desert Eagle \nMP5 \nM4 \nPolice Baton \nArmour \nSniper \nSpray ", "Use", "Cancel");
    } else {
        SendClientMessage(playerid,0xFFFFFFFF,"You are not at the police armory!");
        GameTextForPlayer(playerid,"~r~ERROR",4000,4);
    }
    return 1;  
}
Reply
#4

pawn Код:
if(!strcmp(cmdtext, "/pguns", true))
{
if(!IsPlayerInRangeOfPoint(playerid, 4.0, -1560.4093, 778.7145, -74.6000))
{
SendClientMessage(playerid,0xFFFFFFFF,"You are not at the police armory!");
GameTextForPlayer(playerid,"~r~ERROR",4000,4);
return 1;
}
SendClientMessage(playerid,0xFFFFFFFF,"You are near the Stadium entrance!");
GameTextForPlayer(playerid,"~b~Police ~g~menu",4000,4);
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "SFPD Weapons Armory", "Desert Eagle \nMP5 \nM4 \nPolice Baton \nArmour \nSniper \nSpray ", "Use", "Cancel");
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)