Buddy System..need help
#1

hi everyone
I'm scripting a Buddy command, which saves the buddy...added by /buddy[playerid]
Saving works..that file shows the buddys .. and even there no warning or even errors

Код:
	if(strcmp("/buddy",cmd,true) == 0)
	{
	new player[MAX_PLAYER_NAME];
	GetPlayerName(giveplayerid,giveplayer,sizeof(giveplayer));
	GetPlayerName(playerid,player,sizeof(player));
	tmp=strtok(cmdtext,index);
	giveplayerid = ReturnUser(tmp);
	if(!strlen(tmp))
	{
	SendClientMessage(playerid,COLOR_RED,"Usage:/buddy[playerid]!");
	return 1;
	}
	if(giveplayerid != INVALID_PLAYER_ID)
	{
	
		format(string, sizeof(string), "BuddyOf%s.cer", player);
		new File:BFile;
		BFile = fopen(string, io_append);
		new var[32];
        format(var, 32, "Buddy:%s\n", giveplayer);fwrite(BFile, var);
		fclose(BFile);
		format(string,sizeof(string),"Now You Are %s Buddy!",giveplayer);
		SendClientMessage(playerid, COLOR_YELLOW,string);
		return 1;
	}
	else if(giveplayerid == INVALID_PLAYER_ID)
	{
	SendClientMessage(playerid,COLOR_RED,"This Player Doesn't exists!");
	}
	return 1;
	}
------>But I don't know how to get that buddynames in a command like "/getbuddys"...

Help Me PLS =)

Bearfist
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)