unknown cmd
#1

This command works, It kills but along the way it sends a messsage "unknown command"

Код:
CMD:kill(playerid)
{
	 printf ("starting the cmd");
     if(connected[playerid] == true) return GameTextForPlayer(playerid, "~r~Spawn First", 5000, 5);
     SetPlayerHealth(playerid, 0);
     printf ("setting hp health to 0");
     SendClientMessage(playerid, -1, "{c3c3c3}(INFO) You have killed yourself! (-8 points, -50 respect lost!)");
     printf ("adding some loses to player config file");
	 pInfo[playerid][Deaths]  += 1;
	 pInfo[playerid][Points]  -= 8;
	 pInfo[playerid][Respect] -= 50;
	 return 1;
}
Reply
#2

maybe the problem is here

if(connected[playerid] == true) return GameTextForPlayer(playerid, "~r~Spawn First", 5000, 5);
Reply
#3

Same issue.
Reply
#4

Код:
CMD:kill(playerid)
{
	printf ("starting the cmd");
 	if(connected[playerid] == true) return GameTextForPlayer(playerid, "~r~Spawn First", 5000, 5);
	{
		SetPlayerHealth(playerid, 0);
	    printf ("setting hp health to 0");
	    SendClientMessage(playerid, -1, "{c3c3c3}(INFO) You have killed yourself! (-8 points, -50 respect lost!)");
	    printf ("adding some loses to player config file");
		pInfo[playerid][Deaths]  += 1;
		pInfo[playerid][Points]  -= 8;
		pInfo[playerid][Respect] -= 50;
    }
	return 1;
}
Reply
#5

Same
Reply
#6

So you have a condition that doesn t let the player use the cmd if he is connected?
Reply
#7

if hes spawned, I didn't make that my friend did, It's not the issue anyways.
Reply
#8

yes but i still dont get it.

so if he`s spawned,you tell him to spawn first?

PHP код:
if(connected[playerid] == true
Reply
#9

if hes not spawned
Reply
#10

bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)