if (strcmp(cmd, "/CreateGang", true) ==
{
new gangid;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, " /CreateGang [name][color]");
return 1;
}
if (gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GRAD1, " You need to login to create a Gang");
return 1;
}
new gangName[256];
GetGangName(gangid);
format(string, sizeof(string),"%s.Gang",gangName);
if (fexist(string))
{
SendClientMessage(playerid, COLOR_GRAD1, " That Gang aready exists");
return 1;
}
GetGangName(gangid);
new var[32];//
format(string, sizeof(string), "%s.Gang", gangName);
new File: file = fopen(string, io_read);
if (file)
{
SendClientMessage(playerid, COLOR_GRAD1, " That Gang already exists");
fclose(file);
return 1;
}
GetPlayerName(playerid, playername, sizeof(playername));
new File:hFile;
hFile = fopen(string, io_append);
format(var, 32, "%d gColor\n", GangInfo[gColor]);fwrite(hFile, var);
format(var, 32, "%s gLeader\n", GangInfo[gLeader]);fwrite(hFile, var);
format(var, 32, "%s gMembers\n", GangInfo[gMembers]);fwrite(hFile, var);
fclose(hFile);
return 1;
}
|
Originally Posted by Jamould
Not really considering this is a scripting question
|
|
Originally Posted by Jamould
Not really this is a question about scripting its completely new code. Im getting sick of this shite nobody replies unless theyve got something bad to say.If youve not got anything good to say dont say anything at all
|