i have a poblem
#1

Код:
new gate;
	
	gate = CreateObject(980, 2108.686279, 1968.844116, 12.438099, 0.0000, 0.0000, 90.0000);
	
	
//Admin Gate
if (strcmp(cmdtext, "/opengate", true)==0 && IsPlayerAdmin(playerid))
	{
MoveObject(gate, 2108.675293, 1955.424316, 12.415715,4);
SendClientMessage(playerid, 0xFFFFFFFF,"Gate Is Opening!");
return 1;
	}

if (strcmp(cmdtext, "/closegate", true)==0 && IsPlayerAdmin(playerid))
	{
MoveObject(gate, 2108.686279, 1968.844116, 12.438099,4);
SendClientMessage(playerid, 0xFFFFFFFF,"Gate Closing!");
return 1;
	}
whatґs wrong?
[img width=766 height=768]/imageshack/img43/7264/unbenanntcdn.jpg[/img]

mfg wetze789
Reply
#2

Put those commands in OnPlayerCommandText so it can look like this:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[]) {
  if (strcmp(cmdtext, "/opengate", true)==0 && IsPlayerAdmin(playerid))
  {
    MoveObject(gate, 2108.675293, 1955.424316, 12.415715,4);
    SendClientMessage(playerid, 0xFFFFFFFF,"Gate Is Opening!");
    return 1;
  }

  if (strcmp(cmdtext, "/closegate", true)==0 && IsPlayerAdmin(playerid))
  {
    MoveObject(gate, 2108.686279, 1968.844116, 12.438099,4);
    SendClientMessage(playerid, 0xFFFFFFFF,"Gate Closing!");
    return 1;
  }
}
Reply
#3

ok now only one problem...
and were come...
Код:
gate = CreateObject(980, 2108.686279, 1968.844116, 12.438099, 0.0000, 0.0000, 90.0000);
...?
[img width=766 height=768]/imageshack/img444/9886/unbenanntsv.jpg[/img]

mfg wetze789
Reply
#4

Put this on top of your script
pawn Код:
new gate;
Then put that gate code you've posted in your last message in OnGameModeInit.
Reply
#5

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	new string[256];
	new playermoney;
	new sendername[MAX_PLAYER_NAME];
	new giveplayer[MAX_PLAYER_NAME];
	new cmd[256];
	new giveplayerid, moneys, idx;
	new gate;

	cmd = strtok(cmdtext, idx);
	
  if (strcmp(cmd, "/ogate", true)==0 && IsPlayerAdmin(playerid))
  {
    MoveObject(gate, 2108.675293, 1955.424316, 12.415715,4);
    SendClientMessage(playerid, 0xFFFFFFFF,"Tor ist offen");
    return 1;
  }

  if (strcmp(cmd, "/cgate", true)==0 && IsPlayerAdmin(playerid))
  {
    MoveObject(gate, 2108.686279, 1968.844116, 12.438099,4);
    SendClientMessage(playerid, 0xFFFFFFFF,"Tor ist zu");
    return 1;
  }
...
this is the first

and then:
Код:
public OnGameModeInit()
{
	SetGameModeText("Ventura's DM~MG");

	ShowPlayerMarkers(1);
	ShowNameTags(1);
	EnableStuntBonusForAll(0);

	// Player Class's
	AddPlayerClass(0,1958.3783,1343.1572,15.3746,270.1425,0,0,24,300,-1,-1);
    ...
    CreateObject(1543, 2014.325806, 1926.178589, -22.076740, 0.0000, 0.0000, 270.0000);
	CreateObject(1511, 2011.060425, 1927.110229, -20.949909, 0.0000, 0.0000, 90.0000);
	CreateObject(1546, 2011.228149, 1927.020752, -21.963100, 0.0000, 0.0000, 0.0000);
	CreateObject(1726, 2018.523071, 1925.105103, -23.076984, 0.0000, 0.0000, 270.0000);
	CreateObject(1727, 2016.948853, 1923.502930, -23.076971, 0.0000, 0.0000, 180.0000);
	CreateObject(1507, 2014.277832, 1918.749878, -23.057884, 0.0000, 0.0000, 0.0000);
 	gate = CreateObject(980, 2108.686279, 1968.844116, 12.438099, 0.0000, 0.0000, 90.0000);
gate = CreateObject(980, 2108.686279, 1968.844116, 12.438099, 0.0000, 0.0000, 90.0000); is the last in this list...

and itґs the same problem...

pls help.

mfg wetze789
Reply
#6

You don't listen what you're told to do.

Quote:
Originally Posted by Carlton
>>> Put this on top of your script <<<
pawn Код:
new gate;
Then put that gate code you've posted in your last message in OnGameModeInit.
Reply
#7

THX

Mfg wetze789
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)