help me with make /kill , /reclass , /respawn - 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: help me with make /kill , /reclass , /respawn (
/showthread.php?tid=439504)
help me with make /kill , /reclass , /respawn -
MeysamOlapour - 25.05.2013
ey guys i need help
/kill : kill the player
/reclass: kill the player and give to he/she to change his class
/respawn: kill again
give me Code to add in pawno plz





Re: help me with make /kill , /reclass , /respawn -
RaZzZzoR - 25.05.2013
CMD:kill( playerid, params[] )
{
SetPlayerHealth( playerid, 0 );
return 1;
}
CMD:reclass( playerid, params[] )
{
ForceClassSelection( playerid );
return 1;
}
CMD:respawn( playerid, params[] )
{
SetPlayerHealth( playerid, 0 );
return 1;
}
Re: help me with make /kill , /reclass , /respawn -
Kindred - 25.05.2013
How about you do it yourself and not rely on everyone to make it for you.
And next time, post in the correct place, under Request Scripts.
Re: help me with make /kill , /reclass , /respawn -
Areax - 25.05.2013
Add this under OnPlayerCommandText callback:
pawn Код:
if (strcmp("/reclass", cmdtext, true, 10) == 0)
{
ForceClassSelection(playerid);
TogglePlayerSpectating(playerid, true);
TogglePlayerSpectating(playerid, false);
return 1;
}
if (strcmp("/kill", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid, -1);
return 1;
}
if (strcmp("/respawn", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid, -1);
return 1;
}