SA-MP Forums Archive
Weird problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Weird problem (/showthread.php?tid=597248)



[Solved] Weird problem - Maximun - 28.12.2015

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



Re: Weird problem - Karan007 - 28.12.2015

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




Re: Weird problem - Maximun - 28.12.2015

Thanks for your prompt response but still not working


Re: Weird problem - Maximun - 28.12.2015

Anyone please the problem is still here ...


Re: Weird problem - Jefff - 28.12.2015

Wrong usage IsPlayerInRangeOfPoint

https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint


Re: Weird problem - Maximun - 28.12.2015

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