How to make myself army?
#1

Code:
public OnPlayerSpawn(playerid)
{
    SetPlayerWantedLevel(playerid,0);
    if(gTeam[playerid] == Army)
	{
	    new file[256];
    	format(file, sizeof(file), SERVER_USER_FILE, GetName(playerid));
    	SetPlayerColor(playerid,VIOLET);
		if(dini_Int(file, "IsArmy") != 1)
		{
		    GameTextForPlayer(playerid,"~r~You Have To Be ~g~Army ~n~To Use This!",4000,1);
			ForceClassSelection(playerid); SetPlayerHealth(playerid,0.0);
		}
		/*new Rob = 0;
		new Arm = 0;
		for( new i = 0; i != MAX_PLAYERS; i++)
		{
		    if(gTeam[i] == Robbers)
		    {
		        Rob ++;
			}
			else if(gTeam[i] == Army)
		    {
		        Arm ++;
			}
		}
		if(Rob / 2 < Arm)
		{
		    GameTextForPlayer(playerid,"~r~Please Wait For More Criminals Before Becoming Army!",4000,1);
			ForceClassSelection(playerid); SetPlayerHealth(playerid,0.0);
		}*/
	}
Reply
#2

Edit your file and make IsArmy 1
Reply
#3

What do you mean??
if(dini_Int(file, "IsArmy 1")?
Reply
#4

dini_Int(file, "IsArmy") gets the info from your file then checks that value.
Reply
#5

What file
Reply
#6

...smack yourself

Your save file...

format(file, sizeof(file), SERVER_USER_FILE, GetName(playerid));

That means it's going to be your name, in SERVER_USER_FILE path
Reply
#7

Can you give the pawno and earse the thing u need n put
format(file, sizeof(file), SERVER_USER_FILE, GetName(playerid));
Reply
#8

You don't need to edit anything in the script, you need to edit a separate file.
I suggest you to read basic information about the Windows (if you use Windows) browser, how to open and edit text files. Or.. some common sense wouldn't come bad.
Reply
#9

Quote:
Originally Posted by [ABK]Antonio
View Post
...smack yourself

Your save file...

format(file, sizeof(file), SERVER_USER_FILE, GetName(playerid));

That means it's going to be your name, in SERVER_USER_FILE path
Please help me please =[[[[
Reply
#10

Anyone can fix this gamemode bug will get 5$
bug first 71.199.137.8:7777
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)