SA-MP Forums Archive
[HELP] /Equip 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] /Equip Problem (/showthread.php?tid=191288)



[HELP] /Equip Problem - calanda1 - 18.11.2010

Since some lovely moderator decided to delete my thread instead of moving it to the proper Forum page, I'm forced to make this thread again.. :\ So, I'm trying to create a /equip for my gangs/families and when i enter the HQ to do /gangequip it just tells me that im not in the HQ. I was thinking it had to do with the Virtual World of the HQ. Can someone take a look at the code and let me know what to change

pawn Код:
//------------------------------------TEST /equip ---------------------------------------------
    if(strcmp(cmd, "/gangequip", true) == 0)
    {
    if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pLeader] == 4 || PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pLeader] == 7 || PlayerInfo[playerid][pLeader] == 8 )
    {
       if(IsPlayerInRangeOfPoint(104.0, playerid, 1279.3999,-789.0300,1084.0078))
        {
            SafeResetPlayerWeapons(playerid);
            GameTextForPlayer(playerid, "Armed up!",5000,3);
            GivePlayerWeapon(playerid, 8, 1);
            GivePlayerWeapon(playerid, 18, 15);
            GivePlayerWeapon(playerid, 24, 150);
            GivePlayerWeapon(playerid, 26, 100);
            GivePlayerWeapon(playerid, 28, 500);
            GivePlayerWeapon(playerid, 30, 350);
            SetPlayerHealth(playerid, 100);
            SetPlayerArmour(playerid, 100);
        }
        else
        {
            SendClientMessage(playerid, COLOR_BLUE,"You are not at the HQ");
        }
    }
    else
    {
      SendClientMessage(playerid, COLOR_RED,"You are not a member of this gang!");
    }
 }



Re: [HELP] /Equip Problem - Brian_Furious - 18.11.2010

if(IsPlayerInRangeOfPoint(104.0, playerid, 1279.3999,-789.0300,1084.007)

Change the coordinates, maybe you have other HQ


Re: [HELP] /Equip Problem - MadeMan - 18.11.2010

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 104.0, 1279.3999,-789.0300,1084.0078))
playerid comes before range

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


Re: [HELP] /Equip Problem - Brian_Furious - 18.11.2010

Quote:
Originally Posted by MadeMan
Посмотреть сообщение
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 104.0, 1279.3999,-789.0300,1084.0078))
playerid comes before range

https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
True, maybe he convert PlayerToPoint from some GM's to IsPlayerInRangeOfPoint

i really didnt saw that


Re: [HELP] /Equip Problem - calanda1 - 18.11.2010

Fixed. Thanks.

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 150.0, 1279.3999,-789.0300,1084.0078))
So now i have another question. I'm trying to add this command to all gang hq's. and different guns for each. How?


Re: [HELP] /Equip Problem - salut693123 - 18.11.2010

Wich GM you using?


Re: [HELP] /Equip Problem - calanda1 - 18.11.2010

Raven's. So im guessing LARP and Godfather?


Re: [HELP] /Equip Problem - salut693123 - 18.11.2010

is your /equip problem fixed?


Re: [HELP] /Equip Problem - calanda1 - 18.11.2010

Yep. i had the range before the playerid


Re: [HELP] /Equip Problem - salut693123 - 18.11.2010

Ok nice