Spawn Issue - 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: Spawn Issue (
/showthread.php?tid=617672)
Spawn Issue -
CannonBolt - 24.09.2016
I'm doing something in which doing instructions for players when they first spawn in the server I've found a method around the forums using PVars heres the code..
PHP код:
public OnPlayerSpawn(playerid)
{
SetPlayerInterior(playerid, 0);
if(GetTeam{playerid} == CLASS_DRIVER)
{
switch(GetPVarInt(playerid, "FirstSpawn"))
{
case 0:
{
new Random = ...
SetPlayerColor(playerid, COLOR_WHITE);
(...)//Random Spawn
SetPVarInt(playerid, "FirstSpawn", 1);
SendClientMessage(playerid, -1, "First Spawn 1.");
}
case 1:
{
new Random = ....
SetPlayerColor(playerid, COLOR_WHITE);
(...)//Random Spawn
SendClientMessage(playerid, -1, "First Spawn 2.");
SetPVarInt(playerid, "FirstSpawn", 2);
}
}
}
return 1;
}
Heres the thing the first/second case works but after that it doesnt random spawn the player i'm trying to do it in a way the 3 time the player dies it they wont see "First Spawn 2" again i've try putting SetPVarInt(playerid,"FirstSpawn",3); onplayerdeath but it ignores case 1... Please show me what's wrong
Re: Spawn Issue -
ISmokezU - 24.09.2016
Trying make a case 2..100: I doubt players would be on a server to get 100 death's at once..
Re: Spawn Issue -
Shinja - 24.09.2016
use default: