Spawns
#1

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?
Reply
#2

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
Reply
#3

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

Well, what did you really want?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)