On Death
#1

How can i make when a player port to /dm and when he died on this zone that the spawn not on a base but on the /dm
Reply
#2

use SetSpawnInfo

But if you set the position manual in OnPlayerSpawn you need an array which marks that he is in the deathmatch
And if he is than check in OnPlayerSpawn if he is and set his position correctly
Reply
#3

How can i make this? Sorry im a Noob
Reply
#4

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/dm", true))
    {
        SetSpawnInfo( playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0 );
        //Params: (playerid, team, skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo)

        return 1;
    }
}
Reply
#5

Sorry but how can i make this line to this:

Quote:

if(strcmp(cmdtext,"/dm",true)==0)
{
if(InDM[playerid]!=1)
{
InDM[playerid]++;
SendClientMessage(playerid,COLOR_GREEN,"Du hast die Deathmatch Zone betreten!");
new rand = random(sizeof(RandomSpawnsDM));
SetPlayerPos(playerid,RandomSpawnsDM[rand][0],RandomSpawnsDM[rand][1],RandomSpawnsDM[rand][2]);
GetPlayerPos(playerid,ppos[playerid][0],ppos[playerid][1],ppos[playerid][2]);
}

Reply
#6

I would do a var
Код:
new InDM[MAX_PLAYERS];
new rand = random(sizeof(RandomSpawnsDM));
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/dm", true))
    {
        InDM[playerid]=1;
        SetPlayerPos(playerid, ..., ..., ....)
        SendClientMessage(playerid,COLOR_GREEN,"Du hast die Deathmatch Zone betreten!");
        return 1;
    }
}
Код:
public OnPlayerSpawn(playerid)
{
    if (InDM[playerid] > 0)
    {
    SetPlayerPos(playerid, ..., ..., ....)
    return 1;
    }
}
Not tested. Sry if there're any errors my head is not working at morning.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)