24.06.2013, 01:46
(
Последний раз редактировалось exclide1; 24.06.2013 в 02:32.
)
It should instantly send player to class selection screen and spawn. Is it possible?
There is a function called https://sampwiki.blast.hk/wiki/ForceClassSelection
|
if (strcmp(cmdtext, "/spawn", true) == 0)
{
SpawnPlayer(playerid);
return 1;
}
CMD:teamchange(playerid, params[])
{
ForceClassSelection(playerid);
TogglePlayerSpectating(playerid, true);
TogglePlayerSpectating(playerid, false);
SetSpawnInfo(playerid, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
return 1;
}
CMD:teamc(playerid, params[])
{
Class_ReturnToSelection(playerid);
Class_Goto(playerid, 7);
SpawnPlayer(playerid);
return 1;
}
CMD:teamc(playerid, params[])
{
Class_ReturnToSelection(playerid);
Class_Goto(playerid, 7);
SetTimerEx("spawnnow",100,0,"i",playerid);
return 1;
}
forward spawnnow(playerid);
public spawnnow(playerid)
{
SpawnPlayer(playerid);
return 1;
}