Anything wrong here ?
#1

pawn Код:
if(strcmp(cmd, "/bizentrance", true) == 0) {
        if(IsPlayerConnected(playerid)) {
            if(PlayerInfo[playerid][pAdmin] < 10) {
                SendClientMessage(playerid, COLOR_GRAD2, "   You are not an Admin !");
                return 1;
            }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp)) {
                SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /bizentrance [bizid] - Moves a biz to you");
                return 1;
            }
            new proplev = strval(tmp);
            if(proplev > sizeof(BizzInfo) || proplev < 0) {
                SendClientMessage(playerid,COLOR_WHITE,"Business ID must be above 0 and below 5");
                return 1;
            }
            else {
                new Float:X,Float:Y,Float:Z;
                GetPlayerPos(playerid,X,Y,Z);
                format(string,sizeof(string),"Entrance of Biz %d to %f - %f - %f",proplev,X,Y,Z);
                ABroadCast(COLOR_YELLOW,string,1);
                BizzInfo[proplev][bEntranceX] = X;
                BizzInfo[proplev][bEntranceY] = Y;
                BizzInfo[proplev][bEntranceZ] = Z;
                OnPropUpdate();
                return 1;
            }
        }
        return 1;
    }
I'm pretty sure, because it crashes my server.
Reply
#2

Debug it.
Reply
#3

Fixed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)