C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(23746) : warning 209: function "cmd_checkweapons" shou
#1

C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(23746) : warning 209: function "cmd_checkweapons" should return a value

Код:
CMD:checkweapons(playerid,params[])
{
	new temp[100], idx, targetid, string[256];
			if(IsPlayerConnected(playerid))
			{
				if (PlayerInfo[playerid][pAdmin] < 1)
			    {
				    SendClientMessage(playerid, COLOR_ERROR, "You are not authorized");
				    return 1;
			    }
				temp = strtok(params,idx);
				if (!strlen(temp))
			    {
				    SendClientMessage(playerid, COLOR_WHITE, "Synthax: /checkweapons <playerid/partOfName>");
				    return 1;
			    }
				targetid = ReturnUser(temp);
				if (targetid == INVALID_PLAYER_ID)
			    {
				    SendClientMessage(playerid, COLOR_ERROR, "That player is offline");
				    return 1;
			    }
				new weaponsmodel, ammunition;
				
	   			new playername[MAX_PLAYER_NAME];
			  	GetPlayerName(targetid, playername, MAX_PLAYER_NAME);
				format(string, sizeof(string), "%s has the following weapons:", playername);

				for (new i=0; i<9; i++)
			    {
				    GetPlayerWeaponData(targetid, i, weaponsmodel, ammunition);
				    if(weaponsmodel != 0)
				    {
				        format(string, sizeof(string), "%d: %d (%d)", i, weaponsmodel, ammunition);
				    	SendClientMessage(playerid, COLOR_ADMIN_INFO, string);
					}
			    }
			}
		}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)