Weird problem
#1

Hello everyone, so everything was working good but from addded 'doorExitX' - 'doorExitY' - 'doorExitZ' , the command doesn't work, i'm trying to solve this problem from yesterday all day without result I don't know really what's problem here I see everything clear, so if someone have a idea with this hoping you help me and thanks.


PHP код:
CMD:mint(playerid,params[])
{
    new 
level,price,interior,Float:X,Float:Y,Float:Z;
    if(
PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid,COLOR_RED,"[Error]: Only Admins Can Use This Command!");
    if(
sscanf(params,"iiifff",price,level,interior,X,Y,Z)) SendClientMessage(playerid, -1,"Usage: /mint [Price] [Lvl] [Intr] [PosIntX] [PosIntY] [PosIntZ]");
    else
    for(new 
0sizeof(HIntInfo); i++)
    {
        if (
IsPlayerInRangeOfPoint(2playerid,HIntInfo[i][doorEntranceX], HIntInfo[i][doorEntranceY], HIntInfo[i][doorEntranceZ]))
        {
            
HIntInfo[i][doorBuyPrice] = price//PRICE HOUSE
            
HIntInfo[i][doorLevelRequired] = level//LEVEL HOUSE
             
HIntInfo[i][doorInterior] = interior//INTERIOR HOUSE
             
HIntInfo[i][doorExitX] = X//POS INTERIOR
             
HIntInfo[i][doorExitY] = Y//POS INTERIOR
             
HIntInfo[i][doorExitZ] = Z//POS INTERIOR
             
OnPropUpdate();
         }
    }
    return 
1;

Problem solved by Jeff
The problem was Wrong usage IsPlayerInRangeOfPoint
Reply
#2

Try this

PHP код:
CMD:mint(playerid,params[]) 

    new 
level,price,interior,Float:X,Float:Y,Float:Z
    if(
PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid,COLOR_RED,"[Error]: Only Admins Can Use This Command!"); 
    if(
sscanf(params,"iiifff",price,level,interior,X,Y,Z)) SendClientMessage(playerid, -1,"Usage: /mint [Price] [Lvl] [Intr] [PosIntX] [PosIntY] [PosIntZ]"); 
    for(new 
0sizeof(HIntInfo); i++) 
    { 
        if (
IsPlayerInRangeOfPoint(2playerid,HIntInfo[i][doorEntranceX], HIntInfo[i][doorEntranceY], HIntInfo[i][doorEntranceZ])) 
        { 
            
HIntInfo[i][doorBuyPrice] = price//PRICE HOUSE 
            
HIntInfo[i][doorLevelRequired] = level//LEVEL HOUSE 
             
HIntInfo[i][doorInterior] = interior//INTERIOR HOUSE 
             
HIntInfo[i][doorExitX] = X//POS INTERIOR 
             
HIntInfo[i][doorExitY] = Y//POS INTERIOR 
             
HIntInfo[i][doorExitZ] = Z//POS INTERIOR 
             
OnPropUpdate(); 
         } 
    } 
    return 
1

Reply
#3

Thanks for your prompt response but still not working
Reply
#4

Anyone please the problem is still here ...
Reply
#5

Wrong usage IsPlayerInRangeOfPoint

https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
Reply
#6

That's the problem ... wrong usage!! So sorry! I don't really know how I didn't notice it, thanks brother
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)