Give command dont work..
#1

Why this 2 commands dont work?

Код:
	if(strcmp(cmd, "/setkill", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setkill [Playerid/PartOfName] [kills]");
				return 1;
			}
			new playa;
			new kills1;
			playa = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			kills1 = strval(tmp);
			if (PlayerInfo[playerid][pAdmin] == 1337)
			{
			    if(IsPlayerConnected(playa))
			    {
			        if(playa != INVALID_PLAYER_ID)
			        {
						PlayerInfo[playa][pKills] = kills1;
						SetPlayerScore(playa, PlayerInfo[playa][pKills]);
					}
				}
			}
		}
		return 1;
	}
	if(strcmp(cmd, "/givekill", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givekill [Playerid/PartOfName] [kills]");
				return 1;
			}
			new playa;
			new kills1;
			playa = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			kills1 = strval(tmp);
			if (PlayerInfo[playerid][pAdmin] == 1337)
			{
			    if(IsPlayerConnected(playa))
			    {
			        if(playa != INVALID_PLAYER_ID)
			        {
						PlayerInfo[playa][pKills] += kills1;
						SetPlayerScore(playa, PlayerInfo[playa][pKills]);
					}
				}
			}
		}
		return 1;
	}
Reply


Messages In This Thread
Give command dont work.. - by dundolina - 25.11.2014, 12:00
Re : Give command dont work.. - by Dutheil - 25.11.2014, 12:34
Re: Give command dont work.. - by DavidBilla - 25.11.2014, 12:37
Re: Give command dont work.. - by dundolina - 25.11.2014, 19:39
Re: Give command dont work.. - by dundolina - 26.11.2014, 10:30
Re: Give command dont work.. - by Raweresh - 26.11.2014, 11:21
Re: Give command dont work.. - by dundolina - 26.11.2014, 12:15
Re: Give command dont work.. - by dundolina - 26.11.2014, 16:41
Re: Give command dont work.. - by dundolina - 26.11.2014, 20:30
Re: Give command dont work.. - by Raweresh - 26.11.2014, 21:58

Forum Jump:


Users browsing this thread: 4 Guest(s)