all commands stop working? o.O
#1

let me just start by saying.....ive tried showing the menu for the player that uses /gunsteal and ive tried showing the menu onplayerentercheckpoint; both have same results.....ALL MY OTHER COMMANDS STOP WORKING
what am i doing wrong here guys? any help is appreciated greatly
pawn Код:
if (strcmp("/gunsteal", cmdtext, true, 10) == 0)
     {
          if(IsPlayerInRangeOfPoint(playerid, 20, -2034.89,148.65,28.83))
          {
                SendClientMessage(playerid, 0xFF330000, "the gundepot is located at the gas station across from wangs");
                SendClientMessage(playerid, 0xFF330000, "if you would like to steal a gun go to the red marker there");
                SendClientMessage(playerid, 0xFF330000, "and dont forget..kickass freeroam unlimited {0.3d} FTW.");
             SetPlayerCheckpoint(playerid, -2034.89, 148.65, 28.83, 3.0);
             CreatePickup(1254, 1, -2034.89, 148.65, 28.83);
                return 0;
             
             }
        }
    return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
                ShowPlayerDialog(playerid, 9998, DIALOG_STYLE_LIST, " {ff0000}gun depot.", "$0 - AK47 \n$0 - M4\n$0 - SawnOff Shotgun\n$0 - Desert Eagle\n$0 - Combat Shotgun\n$0 - Sniper\n$0 - shotgun\n$0 - Full Armour + Health", "Set", "Close");
                return 0;
}
Reply
#2

Do you always use scrcmp ??

or zcmd/Ycmd for the rest?
Reply
#3

pawn Код:
if (strcmp("/gunsteal", cmdtext, true, 10) == 0)
     {
          if(IsPlayerInRangeOfPoint(playerid, 20, -2034.89,148.65,28.83))
          {
                SendClientMessage(playerid, 0xFF330000, "the gundepot is located at the gas station across from wangs");
                SendClientMessage(playerid, 0xFF330000, "if you would like to steal a gun go to the red marker there");
                SendClientMessage(playerid, 0xFF330000, "and dont forget..kickass freeroam unlimited {0.3d} FTW.");
             SetPlayerCheckpoint(playerid, -2034.89, 148.65, 28.83, 3.0);
             CreatePickup(1254, 1, -2034.89, 148.65, 28.83);
                return 0;
             
        }
    return 1;
}
Untested.
Reply
#4

Firstly, why you put return 0 in body of command? It's not needed.

Secondly, it aint working cause u missed brackets.
Correct code:
Код:
if (strcmp("/gunsteal", cmdtext, true, 10) == 0)
     {
          if(IsPlayerInRangeOfPoint(playerid, 20, -2034.89,148.65,28.83))
          {
                SendClientMessage(playerid, 0xFF330000, "the gundepot is located at the gas station across from wangs");
                SendClientMessage(playerid, 0xFF330000, "if you would like to steal a gun go to the red marker there");
                SendClientMessage(playerid, 0xFF330000, "and dont forget..kickass freeroam unlimited {0.3d} FTW.");
                CreatePickup(1254, 1, -2034.89, 148.65, 28.83);            
          }
    return 1;
}
Also, it will still fail, since It is not defined which CP to reach to get dialog. however, ur commands gonna work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)