17.07.2017, 22:27
(
Последний раз редактировалось SteSte; 18.07.2017 в 22:41.
)
Introducing SteSte's Tutorial...
this is what I needed, but how do I get the spawn button back? please help.
Ste2: Well Ste, you just simply follow the tutorial backward.
Thank you for reading, I got the idea of this tutorial from a thread.
Warning, once you remove the spawn button, you won't spawn till you togglespectating mode to false or use the SpawnPlayer Function, so I suggest you make like a timer or /spawnme cmd.
Warning, once you remove the spawn button the mouse also disappears, like if you have your own spawn button with textdraws it won't show, so If you need it you can make it appear in different ways, depends on what your doing.
Well, this is a tutorial if it teaches you how to do a specific thing,
though its short, very short, I'll try to make it long lol.
You know that spawn button under OnPlayerRequestClass? oh you don't.
Well, this is awkward, oh wait, I can show you
If you are using the sa-mp class selection then this tutorial is not for you,
if you don't want that spawn button, maybe you want to make your own, then continue reading.
Removing the spawn button, and those arrows are easy, follow these simple steps below.
Step 1: Under OnPlayerRequestClass, add
Step 2: That's it were done, go test it.
Step 3: Oh wait did this happen?
Hahaha, to fix that you need to set the player's spawn info, lets jump to step 4.
Step 4: If you look at the code below, you'll see what you should have for a complete "Spawn" eraser, SetSpawnInfo simply tells the script how to spawn the player, team? skin? positions? weapons? and ammunation. Without setting the spawn info, you'll get kicked, again. TogglePlayerSpectating is the center of the tutorial, it simply set the player to spectating mode, so the spawn doesn't display.
Ste1: Oh thank you very much,though its short, very short, I'll try to make it long lol.
You know that spawn button under OnPlayerRequestClass? oh you don't.
Well, this is awkward, oh wait, I can show you
If you are using the sa-mp class selection then this tutorial is not for you,
if you don't want that spawn button, maybe you want to make your own, then continue reading.
Removing the spawn button, and those arrows are easy, follow these simple steps below.
Step 1: Under OnPlayerRequestClass, add
Код:
TogglePlayerSpectating(playerid, true);
Step 2: That's it were done, go test it.
Step 3: Oh wait did this happen?
Hahaha, to fix that you need to set the player's spawn info, lets jump to step 4.
Step 4: If you look at the code below, you'll see what you should have for a complete "Spawn" eraser, SetSpawnInfo simply tells the script how to spawn the player, team? skin? positions? weapons? and ammunation. Without setting the spawn info, you'll get kicked, again. TogglePlayerSpectating is the center of the tutorial, it simply set the player to spectating mode, so the spawn doesn't display.
PHP код:
public OnPlayerRequestClass(playerid, classid)
{
SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:rotation, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
TogglePlayerSpectating(playerid, true);
return 1;
}
Now lets see what our readers think
this is what I needed, but how do I get the spawn button back? please help.
Ste2: Well Ste, you just simply follow the tutorial backward.
To add back the spawn button, just toggleplayerspectating to false instead of true, and that concludes the tutorial, comment below.
Thank you for reading, I got the idea of this tutorial from a thread.
Warning, once you remove the spawn button, you won't spawn till you togglespectating mode to false or use the SpawnPlayer Function, so I suggest you make like a timer or /spawnme cmd.
Warning, once you remove the spawn button the mouse also disappears, like if you have your own spawn button with textdraws it won't show, so If you need it you can make it appear in different ways, depends on what your doing.