Jump to content

Question

Posted

Am facut si eu o comanda dar nu functioneaza nu da erori la compile nimic dar nu functioneaza in joc

(scriu /e si texul dar nu apare) si daca scriu decat /e apare usage:/e [text]

//-------------event-------------
	if(strcmp(cmd, "/e", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(gPlayerLogged[playerid] == 0)
	        {
	            SendClientMessage(playerid, COLOR_WHITE, "You havent logged in yet !");
	            return 1;
	        }

			if(PlayerInfo[playerid][pLevel] < 3)
			{
				SendClientMessage(playerid, TEAM_CYAN_COLOR, "Trebuie sa ai level 3 sa poti folosii aceasta comanda");
				return 1;
			}
			if(PlayerInfo[playerid][pMuted] == 1)
			{
				SendClientMessage(playerid, TEAM_CYAN_COLOR, "Nu poti vorbii,ai mute !");
				return 1;
			}
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/e) [text]");
				return 1;
			}
			if(PlayerInfo[playerid][pAdmin] < 1)
			{

				format(string, sizeof(string), "(E) %s Level(%d) : {FA5300}%s", sendername, PlayerInfo[playerid][pLevel], result);
				OOCOff(COLOR_PINK,string);
				printf("%s", string);
			}

		}
		return 1;
	}

1 answer to this question

Recommended Posts

Posted

Warn 10%, ti-am zis, Probleme Godfather, regulile sunt reguli, daca nu ajuti si tu pe nimeni de acolo, normal ca nimeni nu te ajuta si pe tine.

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.