[HELP] /Equip Problem
#1

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!");
    }
 }
Reply
#2

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

Change the coordinates, maybe you have other HQ
Reply
#3

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

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

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
Reply
#5

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?
Reply
#6

Wich GM you using?
Reply
#7

Raven's. So im guessing LARP and Godfather?
Reply
#8

is your /equip problem fixed?
Reply
#9

Yep. i had the range before the playerid
Reply
#10

Ok nice
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)