Help with new class selection in 0.3x - 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 with new class selection in 0.3x (
/showthread.php?tid=413720)
Help with new class selection in 0.3x -
Saadat - 06.02.2013
I tried my best, but it didn't workout.
I need help with my CMD:CLASS or /class
I want it that when a player types /class, is it posible that the 0.3x class selection open ups?
If you need my CMD:Class, then here it is
Код:
CMD:class(playerid,params[])
{
if(team[playerid] == TEAM_ZOMBIE) return OnDialogResponse(playerid,DIALOG_CLASS,1,1,"Zombie Classes");
if(time <= 200) return SendClientMessage(playerid,-1,""chat" You can not select a class anymore.");
if(team[playerid] == TEAM_HUMAN) return OnDialogResponse(playerid,DIALOG_CLASS,1,0,"Human Classes");
else return OnDialogResponse(playerid,DIALOG_CLASS,1,1,"Zombie Classes");
}
CMD:nextmap(playerid,params[])
{
if(pInfo[playerid][pLogged] == 1)
{
if(pInfo[playerid][pAdminLevel] >= 6)
{
new map,stringmap[256];
if(sscanf(params,"i", map)) return SendClientMessage(playerid,-1,""chat" /nextmap [mapid]");
format(stringmap,sizeof(stringmap),""chat""COL_LIGHTBLUE" %s %s set next map id to %i",GetAdminName(playerid),PlayerName(playerid),map);
SendClientMessageToAll(-1,stringmap);
mapid = map;
}
}
return 1;
}
Re: Help with new class selection in 0.3x -
Cameltoe - 06.02.2013
Try to add:
ForceClassSelection(playerid);
TogglePlayerSpectating(playerid, true);
TogglePlayerSpectating(playerid, false);