Jump to content
  • 0

erroare string


mrtea

Question

Problema intalnita (descriere):am creat o comanda de admin duty si imi da o eroare la string
Ero(area / rile) / warning-(ul / urile):

CMD:aod(playerid,params[])
{
	if(PlayerInfo[playerid][pAdmin] >=1)
	{
		switch (PlayerInfo[playerid][pAdminDuty])
		{
			case 0:
			{
			    PlayerInfo[playerid][pAdminDuty]=1;
	            GetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
	            GetPlayerArmour(playerid, PlayerInfo[playerid][pArmour]);
	            SetPlayerHealth(playerid, 50000.0);
				format(string, sizeof(string), "{B8FFDB}Admin %s is now on duty .",PlayerInfo[playerid][pNormalName]);
				SendClientMessage(playerid, COLOR_WHITE, string);
				SetPlayerSkin(playerid, 217);
			}
			case 1:
			{
			    PlayerInfo[playerid][pAdminDuty] =0;
			    SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
				SetPlayerArmour(playerid, PlyaerVariables[playerid][pArmour]);
				format(string, sizeof(string), "{B8FFDB}Admin %s is now off duty .",PlayerInfo[playerid][pNormalName]);
				SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
			}
		}
		SubmitToAdmins(string, COLOR_LIGHTRED);
	}
	return 1;
}


Liniile de cod / sursa / script-ul(obligatoriu):linni 40019
Imagini / Video (optional):
Ati incercat sa rezolvati singur?:am incercat dar nu ii dau de capat

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Incearca in felul urmator :

 

new pName[24];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "{B8FFDB}Admin %s is now on duty .", pName);

 

Edited by Rappy
  • Upvote 1
Link to comment
Share on other sites

  • 0
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.