SA-MP Forums Archive
unknown cmd - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: unknown cmd (/showthread.php?tid=650553)



unknown cmd - ivndosos - 02.03.2018

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;
}



Re: unknown cmd - shourya - 02.03.2018

maybe the problem is here

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


Re: unknown cmd - ivndosos - 02.03.2018

Same issue.


Re: unknown cmd - NexyAG - 02.03.2018

Код:
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;
}



Re: unknown cmd - ivndosos - 02.03.2018

Same


Re: unknown cmd - PepsiCola23 - 02.03.2018

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


Re: unknown cmd - ivndosos - 02.03.2018

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


Re: unknown cmd - PepsiCola23 - 02.03.2018

yes but i still dont get it.

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

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



Re: unknown cmd - ivndosos - 02.03.2018

if hes not spawned


Re: unknown cmd - ivndosos - 03.03.2018

bump