Clan check?
#1

Hello,

Is there any way to check if a player is in a clan/gang? I don't want to check if the name of the player is right, example: [GTA]Stieben, but I want it to be in a file so the script checks it.

I hope you know what I want, because my english is not optimal.
Reply
#2

pawn Код:
public OnPlayerConnect(playerid)
{
new PlayerName[MAX_PLAYER_NAME];
new File:file;
new string[128];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), "[GTA]");
if(strcmp(PlayerName, string, true) == 0)
{
fwrite(file, PlayerName);
return 1;
}
fclose(file);
return 1;
}
Reply
#3

@:eddy

Rather than creating the string "string" and formatting it, why not do this:

if(strcmp(PlayerName, "[GTA]", true) == 0)
Reply
#4

Thanks, but is there also a way to put in a file that the name Stieben belonges to the [GTA] clan?
Reply
#5

Quote:
Originally Posted by Weirdosport
@:eddy

Rather than creating the string "string" and formatting it, why not do this:

if(strcmp(PlayerName, "[GTA]", true) == 0)
You might have a point. I didn't really thought about that... lol
Reply
#6

What I mean is the name Stieben is green and that is the color of the [GTA] clan. Everyone that is green is in the [GTA] clan. I hope someone can help me now
Reply
#7

btw, that code is not working either
Reply
#8

Come on I really need this
Reply
#9

What do you actually mean? Could you be a little bit more specific?

And don't triple post. :P
Reply
#10

ok, sorry for that.

I am building a stunt area with a gate in front. That stunt area should be for 1 certain clan (example: [GTA]). So the gate only opens if you're in that clan. I don't know how to make a code that checks if you're in that clan. Also I would like that clan to have their own color (example: green).

That is what I want
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)