#1

Just wondering how I would make a /Creategang command that saves. Like /Creategang [name][color] for color you would put in a hex code like /Creategang Grove Street D900C8. This is for Pen1.
So far Ive got
Код:
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;
	}
Reply
#2

Im interested in this answer too, but mine if for godfather, if anyone can reply, that would be great.
Reply
#3

You have to ask in PEN1 thread ..
Reply
#4

Not really considering this is a scripting question
Reply
#5

Quote:
Originally Posted by Jamould
Not really considering this is a scripting question
Ya rly since this has to do with that gamemode.
Reply
#6

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
Reply
#7

Quote:
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
so why dont u just ask in the Pen1 Thread?
im sure ull be helped there
Reply
#8

Its the same wherever you post it. Im pretty sure Ill be told to post in scripting discussion
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)