Pawno help needed -
ragu1987 - 01.11.2013
guys i have made a dm the cmd to enter dm is /dm..... in my game mode i have 5 teams and a team Mercenary...the specialty of Mercenary is that in Mercenary team members can fight each other all i need is to set player team to Mercenary when they type /dm how to do ......
Re: Pawno help needed -
ragu1987 - 01.11.2013
please help me i am a noob scripter
Re: Pawno help needed -
newbie scripter - 01.11.2013
pawn Код:
new gTeam [MAX_PLAYERS];
CMD:dm(playerid, params)
{
// SetPlayerPos(playerid, Posx, Posy, Posz); if u want to Teleport the player to a Stadium, Posx, Posy, Posz= Co-ords of the place, u mast change it
gTeam[playerid] = Mercenary;
// SendClientMessage(playerid, -1, "You Have Entered DM"); message
return 1;
}
1. u pasted this in an wrong section
2.my code may or may not be right
3.i used ZCMD
4. uncomment it if u want.
Re: Pawno help needed -
ragu1987 - 01.11.2013
bro its not working
Re: Pawno help needed - Astralis - 01.11.2013
Quote:
Originally Posted by ragu1987
bro its not working 
|
post your /dm command here.
Re: Pawno help needed -
ragu1987 - 01.11.2013
COMMAND:dm(playerid, params[])
{
dmarena[playerid] = 1;
//Random Spawns
new rand = random(sizeof(DMRandomSpawns));
SetPlayerPos(playerid, DMRandomSpawns[rand][0], DMRandomSpawns[rand][1], DMRandomSpawns[rand][2]);
SetPlayerSkin(playerid, 230);
ResetPlayerWeapons(playerid);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
GivePlayerWeapon(playerid, 9, 99999999);
GivePlayerWeapon(playerid, 24, 99999999);
GivePlayerWeapon(playerid, 32, 99999999);
GivePlayerWeapon(playerid, 26, 99999999);
GivePlayerWeapon(playerid, 31, 99999999);
GivePlayerWeapon(playerid, 34, 99999999);
SendClientMessage(playerid,0xFFFFFFF, "To exit the DM arena use /exitdm");
return 1;
}
COMMAND:exitdm(playerid, params[])
{
dmarena[playerid] = 0;
SetPlayerHealth(playerid, 0);
return 1;
}
Re: Pawno help needed -
iFiras - 01.11.2013
First, do this
pawn Код:
COMMAND:exitdm(playerid,params[])
{
dmarena[playerid] =0;
SetPlayerHealth(playerid,0);
SpawnPlayer(playerid);
return 1;
}
then OnPlayerSpawn
pawn Код:
public OnPlayerSpawn(playerid)
{
if(dmarena[playerid] == 1)
{
new rand = random(sizeof(DMRandomSpawns));
SetPlayerPos(playerid, DMRandomSpawns[rand][0], DMRandomSpawns[rand][1], DMRandomSpawns[rand][2]);
SetPlayerSkin(playerid, 230);
else {
dmarena[playerid] =0;
SpawnPlayer(playerid);
}
}
return 1;
}
Hope it works for you
Re: Pawno help needed -
ragu1987 - 01.11.2013
Quote:
Originally Posted by iFiras
First, do this
pawn Код:
COMMAND:exitdm(playerid,params[]) { dmarena[playerid] =0; SetPlayerHealth(playerid,0); SpawnPlayer(playerid); return 1; }
then OnPlayerSpawn
pawn Код:
public OnPlayerSpawn(playerid) { if(dmarena[playerid] == 1) { new rand = random(sizeof(DMRandomSpawns)); SetPlayerPos(playerid, DMRandomSpawns[rand][0], DMRandomSpawns[rand][1], DMRandomSpawns[rand][2]); SetPlayerSkin(playerid, 230); else { dmarena[playerid] =0; SpawnPlayer(playerid); } } return 1; }
Hope it works for you 
|
i need to set them to team Mercenary how to?
Re: Pawno help needed -
ragu1987 - 03.11.2013
Found Some solution
1.SetPlayerTeam(playerid, NO_TEAM);
2.SetPlayerTeam (playerid,playerid+6);
both of these work but ...
these two have a bug using this team members can kill each other but alert message (abti team attack message appears what to do" is there any way to disable alert message in dm area alone??
if would be better if someone find a way to set team to Mercenary..