SA-MP Forums Archive
Changing. - 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: Changing. (/showthread.php?tid=656253)



Changing. - Dangjai - 11.07.2018

PHP код:
stock GetGangID(id)
{
    foreach(new 
Gangs)
        
//if(Gang[i][GangID] == id)
            
return i;
    return -
1;

Anyway to change it to that format?

PHP код:
if(pGroupID[playerid] == -1
To get the gang ID.


Re: Changing. - Florin48 - 11.07.2018

Well, is not it good what you did?

Код:
stock GetGangID(id) 
{ 
    foreach(new i: Gangs) {
        if(Gang[i][GangID] == id) return i; 
    }
    return -1; 
}
your code is good


Re: Changing. - Dangjai - 11.07.2018

I wanna to make it in pGroupID not gangID


Re: Changing. - Florin48 - 11.07.2018

you can make

if(pGroupID[playerid] == GetGangID(id))


Re: Changing. - Dangjai - 11.07.2018

Quote:
Originally Posted by Florin48
Посмотреть сообщение
you can make

if(pGroupID[playerid] == GetGangID(id))
Bro i wanna make whole in same style but in pGroupID , i'll remove GangID


Re: Changing. - Sew_Sumi - 11.07.2018

Find and Replace?


But seriously though, what?


Re: Changing. - ItsRobinson - 11.07.2018

Quote:
Originally Posted by Dangjai
Посмотреть сообщение
Bro i wanna make whole in same style but in pGroupID , i'll remove GangID
If you're using a premade script, you're going to find that very difficult, but when a player joins a gang, you can set their gang pGroupID and then check the group ID from that.