TeLePoRt PrObLeM
#1

Help When I Type This I Get The Eror

C:\Documents and Settings\Administrator\Desktop\Stunt-server\gamemodes\Stunt_World.pwn(123) : error 010: invalid function or declaration

__________________________________________________ ____________________________________________

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/help", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, 0xFFFF00AA, "Type /teles for list of teleports");
SendClientMessage(playerid, 0xFFFF00AA, "Type /cmds for list of commands");

}
return 0;
}
if(strcmp("/teles", cmdtext, true, 10) == 0)
SendClientMessage(playerid, 0xFFFF00AA,"Stunts: /nrg,/nrg2,/nrg3,/nrg4,/nrg5,/nrg6,/nrg7");
SendClientMessage(playerid, 0xFFFF00AA,"/kart,/quad,/monster,/faggio.");
SendClientMessage(playerid, 0xFFFF00AA,"Jumps: /bounce,/bounce2,/hj,/sj,/cj,/wj,/bj");
SentClientMessage(playerid, 0xFFFF00AA,"War zones: /war,/ww,/hw.");
Reply
#2

put your /teles command above the "return 0;" also use brackets ('{' and '}') to close it off
Reply
#3

like this
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  if(strcmp("/help", cmdtext, true, 10) == 0)
  {
    SendClientMessage(playerid, 0xFFFF00AA, "Type /teles for list of teleports");
    SendClientMessage(playerid, 0xFFFF00AA, "Type /cmds for list of commands");
    return 1;
  }
  if(strcmp("/teles", cmdtext, true, 10) == 0)
  {
    SendClientMessage(playerid, 0xFFFF00AA,"Stunts: /nrg,/nrg2,/nrg3,/nrg4,/nrg5,/nrg6,/nrg7");
    SendClientMessage(playerid, 0xFFFF00AA,"/kart,/quad,/monster,/faggio.");
    SendClientMessage(playerid, 0xFFFF00AA,"Jumps: /bounce,/bounce2,/hj,/sj,/cj,/wj,/bj");
    SentClientMessage(playerid, 0xFFFF00AA,"War zones: /war,/ww,/hw.");
    return 1;
  }
  return 0;
}
Reply
#4

Thx guyz!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)