Force to Class Selection - 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: Force to Class Selection (
/showthread.php?tid=285692)
Force to Class Selection -
spd_sahil - 25.09.2011
pawn Код:
if(!IsPlayerAdmin(playerid))return 0;
new tmp[64],id;
tmp=strtok(cmdtext,idx);
if(!strlen(tmp)) return 0;
id=strval(tmp);
SetPlayerHealth(id,0);
ForceClassSelection(id);
return 1;
This is my code.. its in On Player Command Text i have all the neccessary variables for the command.. but it doesnt seem to work
Re: Force to Class Selection -
[HiC]TheKiller - 25.09.2011
What doesn't seem to be working? Make sure that tmp has a value and make sure the player is logged into the rcon console.
Re: Force to Class Selection -
spd_sahil - 25.09.2011
this is the script to force some player to class selcetion
Re : Force to Class Selection -
timaoux - 25.09.2011
use sscanf
if(!IsPlayerAdmin(playerid))return 0;
new id;
if(ssccanf(params,"uz",id)) return 0;
ForceClassSelection(id);
return 1;
Re: Force to Class Selection -
spd_sahil - 25.09.2011
i have dcmd code in my script.. will sscanf be compatible with it ??
Re : Force to Class Selection -
timaoux - 25.09.2011
hmm idk me i got zcmd so maybe dcmd will be compatible with it
Re : Force to Class Selection -
timaoux - 25.09.2011
coast nothing to try ^^
Re: Force to Class Selection -
Ash. - 25.09.2011
sscanf is compatible with dcmd.
When you have called
You need to kill the player to send them to the class selection screen.
pawn Код:
//So
ForceClassSelection(id);
SetPlayerHealth(id, 0.0);
In your code, you kill them before using ForceClassSelection, thus the command will not work. (It will, but not for the intended result)
Re : Force to Class Selection -
timaoux - 25.09.2011
ho ye forget set player heatlh ^^