SA-MP Forums Archive
Spawns - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Spawns (/showthread.php?tid=244691)



Spawns - Lutsen - 28.03.2011

Hey, i use AddPlayerClass, but when i activate a mode like with /modeon i want people to spawn somewhere else if they come in the server. So to change the spawnpositions of the "Addplayerclasses" if i type something. How to do this?


Re: Spawns - Jochemd - 28.03.2011

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(SpawnMode == true) SetPlayerPos(playerid,X,Y,Z); // Change X Y Z to your position
    return 1;
}
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext,"/modeon",true))
    {
        if(SpawnMode == true)
        {
            SpawnMode = false;
            SendClientMessage(playerid,-1,"Special spawn disabled.");
        }
        else if(SpawnMode == false)
        {
            SpawnMode = true;
            SendClientMessage(playerid,-1,"Special spawn enabled.");
        }
        return 1;
    }
    return 0;
}
Supposed to work


Re: Spawns - Lutsen - 28.03.2011

Not really what i wanted but never mind got figured it out.. Thanks anyway.


Re: Spawns - Jochemd - 28.03.2011

Well, what did you really want?