Respawn command
#1

Hi everyone I need help ive never before used dcmd and I need help creating a command that will respawn everyone not just 1 person if someone is going to help me the command is has to be /newround.Thanks
Reply
#2

I assume you have the dcmd define line, if not:
Put this inder the includes
Код:
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
Put this anywhere (out side any callback)
Код:
dcmd_newround(playerid,params[])
{
	new i;
	for(i=0;i<GetMaxPlayers();i++)
	{
		SpawnPlayer(i); //to spawn every player
		ForceClassSelection(i); 
		SetPlayerHealth(i,0.0); //above two lines will bring them back to Class selection
	}
	return 1;
}
//Under OnPlayerCommandText
Код:
dcmd(newround,8,cmdtext);
Reply
#3

Thank you i will try it out now

Edit:it all works thank you very much.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)