public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/basefree", cmdtext, true, 10) == 0)
{
new pname[MAX_PLAYER_NAME];
new string[43];
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid, 1431, 1005, 11);
SendClientMessage(playerid,0x0B6F00AA, "{FF0101}Seja Bem Vindo a {0C01FF}Base Free");
SendClientMessage(playerid,0x0B6F00AA, "Para Ver os Criadores da BF. Digite /cbf");
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s foi para a Base Free /BaseFree", pname);
SendClientMessageToAll(0x33CCFFAA, string);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/basefree", cmdtext, true, 10) == 0)
{
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
SendClientMessage(playerid,0x0B6F00AA, "Espere 10 segundos para ser teleportado.");
SetTimerEx("AntiEsc", 10000, false, "dfff", playerid, Pos[0], Pos[1], Pos[2]);
return 1;
}
return 0;
}
forward Check(pID, Float:X, Float:Y, Float:Z);
public Check(pID, Float:X, Float:Y, Float:Z)
{
new Float:Pos[3];
GetPlayerPos(pID, Pos[0], Pos[1], Pos[2]);
if(Pos[0] == X && Pos[1] == Y && Pos[2] == Z)
{
new nome[MAX_PLAYER_NAME];
SetPlayerInterior(pID,0);
SetPlayerPos(pID, 1431, 1005, 11);
SendClientMessage(pID,0x0B6F00AA, "{FF0101}Seja Bem Vindo a {0C01FF}Base Free");
SendClientMessage(pID,0x0B6F00AA, "Para Ver os Criadores da BF. Digite /cbf");
GetPlayerName(pID,nome,sizeof(nome));
format(string, sizeof(string), "%s foi para a Base Free /BaseFree", nome);
SendClientMessageToAll(0x33CCFFAA, string);
}
else { SendClientMessage(playerid,0x0B6F00AA, "Vocк se mexeu e por isto nгo foi teleportado."); }
return 1;
}
C:\Documents and Settings\Cliente\Desktop\Test\filterscripts\BaseFre.pwn(327) : error 010: invalid function or declaration C:\Documents and Settings\Cliente\Desktop\Test\filterscripts\BaseFre.pwn(332) : error 010: invalid function or declaration C:\Documents and Settings\Cliente\Desktop\Test\filterscripts\BaseFre.pwn(334) : error 010: invalid function or declaration C:\Documents and Settings\Cliente\Desktop\Test\filterscripts\BaseFre.pwn(344) : error 017: undefined symbol "playerid" C:\Documents and Settings\Cliente\Desktop\Test\filterscripts\BaseFre.pwn(345) : error 017: undefined symbol "playerid" C:\Documents and Settings\Cliente\Desktop\Test\filterscripts\BaseFre.pwn(346) : error 017: undefined symbol "playerid" C:\Documents and Settings\Cliente\Desktop\Test\filterscripts\BaseFre.pwn(347) : error 017: undefined symbol "playerid" C:\Documents and Settings\Cliente\Desktop\Test\filterscripts\BaseFre.pwn(349) : error 017: undefined symbol "string" C:\Documents and Settings\Cliente\Desktop\Test\filterscripts\BaseFre.pwn(349) : error 017: undefined symbol "string" C:\Documents and Settings\Cliente\Desktop\Test\filterscripts\BaseFre.pwn(349) : error 029: invalid expression, assumed zero C:\Documents and Settings\Cliente\Desktop\Test\filterscripts\BaseFre.pwn(349) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 11 Errors.
Nгo й mais fбcil usar TogglePlayerControllable para congelar o player de uma vez?
Use SetTimerEx com GetPlayerPos, depois й sу comparar a posiзгo dele й igual a posiзгo dele (X == X, Y == Y, Z == Z), se nгo for, ele se mexeu. |
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/basefree", cmdtext, true, 10) == 0)
{
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
SendClientMessage(playerid,0x0B6F00AA, "Espere 10 segundos para ser teleportado.");
SetTimerEx("AntiEsc", 10000, false, "dfff", playerid, Pos[0], Pos[1], Pos[2]);
return 1;
}
return 0;
}
forward Check(playerid, Float:X, Float:Y, Float:Z);
public Check(playerid, Float:X, Float:Y, Float:Z)
{
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
if(Pos[0] == X && Pos[1] == Y && Pos[2] == Z)
{
new nome[MAX_PLAYER_NAME];
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid, 1431, 1005, 11);
SendClientMessage(playerid,0x0B6F00AA, "{FF0101}Seja Bem Vindo a {0C01FF}Base Free");
SendClientMessage(playerid,0x0B6F00AA, "Para Ver os Criadores da BF. Digite /cbf");
GetPlayerName(playerid,nome,sizeof(nome));
format(string, sizeof(string), "%s foi para a Base Free /BaseFree", nome);
SendClientMessageToAll(0x33CCFFAA, string);
}
else { SendClientMessage(playerid,0x0B6F00AA, "Vocк se mexeu e por isto nгo foi teleportado."); }
return 1;
}
C:\Documents and Settings\Cliente\Desktop\Test\filterscripts\BaseFre.pwn(344) : error 017: undefined symbol "playerid"
else { SendClientMessage(playerid,0x0B6F00AA, "Vocк se mexeu e por isto nгo foi teleportado."); }
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/basefree", cmdtext, true, 10) == 0)
{
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
SendClientMessage(playerid,0x0B6F00AA, "Espere 10 segundos para ser teleportado.");
SetTimerEx("Check", 10000, false, "dfff", playerid, Pos[0], Pos[1], Pos[2]);
return 1;
}
return 0;
}
forward Check(pID, Float:X, Float:Y, Float:Z);
public Check(pID, Float:X, Float:Y, Float:Z)
{
new Float:Pos[3];
GetPlayerPos(pID, Pos[0], Pos[1], Pos[2]);
if(Pos[0] == X && Pos[1] == Y && Pos[2] == Z)
{
new nome[MAX_PLAYER_NAME];
SetPlayerInterior(pID,0);
SetPlayerPos(pID, 1431, 1005, 11);
SendClientMessage(pID,0x0B6F00AA, "{FF0101}Seja Bem Vindo a {0C01FF}Base Free");
SendClientMessage(pID,0x0B6F00AA, "Para Ver os Criadores da BF. Digite /cbf");
GetPlayerName(pID,nome,sizeof(nome));
format(string, sizeof(string), "%s foi para a Base Free /BaseFree", nome);
SendClientMessageToAll(0x33CCFFAA, string);
}
else { SendClientMessage(pID,0x0B6F00AA, "Vocк se mexeu e por isto nгo foi teleportado."); }
return 1;
}