command /dm
#1

i have created command /dm , she teleports me to dm zone , and when i die he teleports me back to spawn point
help me i need script if i write /dm i stay in DM zone , since i write /leavedm

P.S. sorry for my bad english =)
Reply
#2

Quote:
Originally Posted by sk1llz
she teleports me to dm zone
Whos she?
Quote:
Originally Posted by sk1llz
he teleports me back to spawn point
Whos he?

He and she is when you are talking about people.
Reply
#3

Quote:
Originally Posted by Mikeshake
Quote:
Originally Posted by sk1llz
she teleports me to dm zone
Whos she?
Quote:
Originally Posted by sk1llz
he teleports me back to spawn point
Whos he?

He and she is when you are talking about people.
i have created command /dm , this command teleports me to dm zone , and when somebody kill me , i'm teleporting back to spawn point
help me i need script if i write /dm i stay in DM zone , since i write /leavedm
P.S. sorry for my bad english !!! (for idiots)
Reply
#4

Use a variable.

pawn Код:
New InDm[MAX_PLAYERS];
When you go to dm:

pawn Код:
ImDm[playerid] = 1;
When you exit DM:

pawn Код:
ImDm[playerid] = 0;
OnPlayerSpawn:

pawn Код:
if(ImDm[playerid] == 1)
{
  SetPlayerPos(playerid, X, Y, Z);
}
Reply
#5

Quote:
Originally Posted by Mikeshake
Use a variable.

pawn Код:
New InDm[MAX_PLAYERS];
When you go to dm:

pawn Код:
ImDm[playerid] = 1;
When you exit DM:

pawn Код:
ImDm[playerid] = 0;
OnPlayerSpawn:

pawn Код:
if(ImDm[playerid] == 1)
{
 SetPlayerPos(playerid, X, Y, Z);
}
where add this ?
Reply
#6

I told you.
Reply
#7

Quote:
Originally Posted by Mikeshake
I told you.
pawn Код:
if (strcmp(cmdtext, "/dm", true)==0)
 {
SetPlayerWorldBounds(playerid,9999999999.0,-99999999999.0,999999999999.0,-99999999999.0);
 new rand = random(sizeof(gRandomDmSpawns));
 GameTextForPlayer(playerid,"~w~ DeathMatch Zone",3,1);
 new name[MAX_PLAYER_NAME+1];
 GetPlayerName(playerid, name, sizeof(name));
 format(string, sizeof(string), "*** %s teleported to the DeathMatch Zone ( command /dm ).", name);
 SendClientMessageToAll(COLOR_YELLOW, string);
 SetPlayerInterior(playerid,0);
 SetPlayerPos(playerid, gRandomDmSpawns[rand][0],gRandomDmSpawns[rand][1],gRandomDmSpawns[rand][2]);
 SetPlayerFacingAngle(playerid, gRandomDmSpawns[rand][3]);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 32, 2000);
GivePlayerWeapon(playerid, 30, 1000);
GivePlayerWeapon(playerid, 24, 500);
 return 1;
}
this is mine /dm command ;[
Reply
#8

Anywhere..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)