Dm question
#1

Код:
if (strcmp("/dm4", cmdtext, true, 10) == 0)
	{
  SendClientMessage(playerid,0xFF66FFAA," Dm zone 4");
  SetPlayerPos(playerid,2767.7849,-1446.1348,66.8672);
  ResetPlayerWeapons(playerid);
  GivePlayerWeapon(playerid,30,10000);
  SetPlayerHealth(playerid,100.0);
  SetPlayerArmour(playerid, 100);
  return 1;
  }
  if (strcmp("/dm1", cmdtext, true, 10) == 0)
	{
  SendClientMessage(playerid,0xFF66FFAA," Dm zone 1");
  SetPlayerPos(playerid,1574.5226,-1249.8947,277.8788);
  ResetPlayerWeapons(playerid);
  GivePlayerWeapon(playerid,24,10000);
  SetPlayerHealth(playerid,100.0);
  SetPlayerArmour(playerid, 100);
  return 1;
  }
  if (strcmp("/dm2", cmdtext, true, 10) == 0)
	{
  SendClientMessage(playerid,0xFF66FFAA," Dm zone 2");

  SetPlayerPos(playerid,1484.8605,-1261.4529,113.7795);
  ResetPlayerWeapons(playerid);
  GivePlayerWeapon(playerid,25,10000);
  SetPlayerHealth(playerid,100.0);
  SetPlayerArmour(playerid, 100);
  return 1;
  }
How do to write all the "Player ***** join dm 2 " dm all I need to do Excuse me for bad language
Reply
#2

pawn Код:
new name[MAX_PLAYER_NAME], string[128];
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
    format(string, 128, "Player %s joined the dm", name);
    SendClientMessageToAll(color, string);
Reply
#3

Quote:
Originally Posted by dice7
pawn Код:
new name[MAX_PLAYER_NAME], string[128];
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
    format(string, 128, "Player %s joined the dm", name);
    SendClientMessageToAll(color, string);
Код:
C:\Documents and Settings\Admin\Рабочий стол\СЕРВ\gamemodes\DeaDMaN.pwn(2660) : warning 219: local variable "string" shadows a variable at a preceding level
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Reply
#4

please help!! !
Reply
#5

Please help!! My code
Код:
if (strcmp("/dm1", cmdtext, true, 10) == 0)
	{
	new name[MAX_PLAYER_NAME], string[128];
	GetPlayerName(playerid, name, MAX_PLAYER_NAME);
	format(string, 128, "Player %s joined the dm", name);
	SendClientMessageToAll(COLOR_GREY, string);
  SetPlayerPos(playerid,1574.5226,-1249.8947,277.8788);
  ResetPlayerWeapons(playerid);
  GivePlayerWeapon(playerid,24,10000);
  SetPlayerHealth(playerid,100.0);
  SetPlayerArmour(playerid, 100);
  return 1;
  }
Warning:
Код:
C:\Documents and Settings\Admin\Рабочий стол\СЕРВ\gamemodes\lvdm.pwn(192) : warning 219: local variable "string" shadows a variable at a preceding level
Reply
#6

Код:
if (strcmp("/dm1", cmdtext, true, 10) == 0)
	{
	new name[MAX_PLAYER_NAME];
	GetPlayerName(playerid, name, MAX_PLAYER_NAME);
	format(string, 128, "Player %s joined the dm", name);
	SendClientMessageToAll(COLOR_GREY, string);
  SetPlayerPos(playerid,1574.5226,-1249.8947,277.8788);
  ResetPlayerWeapons(playerid);
  GivePlayerWeapon(playerid,24,10000);
  SetPlayerHealth(playerid,100.0);
  SetPlayerArmour(playerid, 100);
  return 1;
  }
Reply
#7

Quote:
Originally Posted by Drake1994
Код:
if (strcmp("/dm1", cmdtext, true, 10) == 0)
	{
	new name[MAX_PLAYER_NAME];
	GetPlayerName(playerid, name, MAX_PLAYER_NAME);
	format(string, 128, "Player %s joined the dm", name);
	SendClientMessageToAll(COLOR_GREY, string);
  SetPlayerPos(playerid,1574.5226,-1249.8947,277.8788);
  ResetPlayerWeapons(playerid);
  GivePlayerWeapon(playerid,24,10000);
  SetPlayerHealth(playerid,100.0);
  SetPlayerArmour(playerid, 100);
  return 1;
  }
Код:
C:\Documents and Settings\Admin\Рабочий стол\СЕРВ\gamemodes\bare.pwn(48) : error 017: undefined symbol "string"
Reply
#8

Код:
     new string[128];
	if (strcmp("/dm1", cmdtext, true, 10) == 0)
	{
	new name[MAX_PLAYER_NAME];
	GetPlayerName(playerid, name, MAX_PLAYER_NAME);
	format(string, 128, "Player %s joined the dm", name);
	SendClientMessageToAll(COLOR_GREY, string);
  SetPlayerPos(playerid,1574.5226,-1249.8947,277.8788);
  ResetPlayerWeapons(playerid);
  GivePlayerWeapon(playerid,24,10000);
  SetPlayerHealth(playerid,100.0);
  SetPlayerArmour(playerid, 100);
  return 1;
  }
Here you go, tested and error free.
Reply
#9

NICE MAN!! WORKS GOOD SORRY MY ENGLISH
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)