20.12.2011, 16:40
Hello,
I am trying to make when a player creates a gang, and the player's gangname is already choosen by someone else, it should send a message, but it ain't working.
Here's the code
It just keeps on making the gang, please help, thanks.
Rep will be given.
I am trying to make when a player creates a gang, and the player's gangname is already choosen by someone else, it should send a message, but it ain't working.
Here's the code
pawn Код:
for(new i; i < TotalGangs; i++)
{
format(CheckName, sizeof(CheckName), Gang_File, i);
if(DOF_FileExists(CheckName))
{
new gname[128];
strcat(gname, DOF_GetString(CheckName, "Name"), 128);
if(strcmp(GangName, gname, true) == 0)
{
SendClientMessage(playerid, Red, "A gang with this name already exists");
return 1;
}
}
}
Rep will be given.