22.07.2011, 16:47
i using this filterscript for creating gangs: https://sampforum.blast.hk/showthread.php?tid=261411
how to make when someone invite somebody then this player which is invited to get in his nick tag of gang in which he is invited!
this is command when someone allow invite for gang:
this is callback of joining in gang:
how to make when someone invite somebody then this player which is invited to get in his nick tag of gang in which he is invited!
this is command when someone allow invite for gang:
Код:
if(strcmp(tmp, "join", true) == 0) { if(PlayerGang[playerid] != 0) return SendClientMessage(playerid, RandomColors[random(200)], "You must leave your gang first"); if(invited[playerid] == 0) return SendClientMessage(playerid, RandomColors[random(200)], "You were not invited in any gang"); JoinGang(playerid, invited[playerid]); return 1; }
Код:
public JoinGang(playerid, gangid) { new file[100]; new name[MAX_PLAYER_NAME]; new gfile[100]; format(gfile, sizeof(gfile), GANG_FILE, gangid); GetPlayerName(playerid, name, sizeof(name)); format(file, sizeof(file), NAME_FILE, name); dini_IntSet(file, "PGANG", gangid); new string[256]; new stringeng[256]; PlayerGang[playerid] = gangid; GangInfo[gangid][GANG_MEMBERS]++; if(ITA[playerid]) format(string, sizeof(string), "Sei entrato a far parte della gang %s, Membri: %d", GangInfo[gangid][GANG_NAME], GangInfo[gangid][GANG_MEMBERS]); else format(string, sizeof(string), "You joined the gang %s, Members: %d", GangInfo[gangid][GANG_NAME], GangInfo[gangid][GANG_MEMBERS]); SendClientMessage(playerid, RandomColors[random(200)], string); format(string, sizeof(string), "%s č entrato a far parte della gang %s", name , GangInfo[gangid][GANG_NAME]); format(stringeng, sizeof(stringeng), "%s Has joined the gang %s", name , GangInfo[gangid][GANG_NAME]); Message2All(string, stringeng); SetPlayerColor(playerid, GangInfo[gangid][GANG_COLOR]); dini_IntSet(gfile, "GANG_MEMBERS", GangInfo[gangid][GANG_MEMBERS]); return 1; }