public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == lojadearmas) { // loja
if(IsPlayerInRangeOfPoint(playerid, 10.0, 2002.2496,922.2856,10.8203))
{
GameTextForPlayer(playerid,"~w~ bem vindo", 6000,4); // Game text
if(strcmp(cmd, "/teste123", true) == 0) {
}
SendPlayerFormattedText(playerid,"===========================¦Armas¦===========================",0);
SendClientMessage(playerid,COLOR_WHITE,"/conteudo");
SendClientMessage(playerid,COLOR_WHITE,"/conteudo");
SendPlayerFormattedText(playerid,"===========================¦armas===========================", 0);
}
return 1;
}
C:\DOCUME~1\ddd\Desktop\SAMPSE~1\GAMEMO~1\lvdm.pwn(181) : error 017: undefined symbol "cmd"
C:\DOCUME~1\ddd\Desktop\SAMPSE~1\GAMEMO~1\lvdm.pwn(183) : error 029: invalid expression, assumed zero
C:\DOCUME~1\ddd\Desktop\SAMPSE~1\GAMEMO~1\lvdm.pwn(184) : error 004: function "SendPlayerFormattedText" is not implemented
C:\DOCUME~1\ddd\Desktop\SAMPSE~1\GAMEMO~1\lvdm.pwn(187) : error 004: function "SendPlayerFormattedText" is not implemented
C:\DOCUME~1\ddd\Desktop\SAMPSE~1\GAMEMO~1\lvdm.pwn(189) : error 079: inconsistent return types (array & non-array)
C:\DOCUME~1\ddd\Desktop\SAMPSE~1\GAMEMO~1\lvdm.pwn(192) : warning 225: unreachable code
C:\DOCUME~1\ddd\Desktop\SAMPSE~1\GAMEMO~1\lvdm.pwn(192) : error 029: invalid expression, assumed zero
C:\DOCUME~1\ddd\Desktop\SAMPSE~1\GAMEMO~1\lvdm.pwn(192) : error 004: function "MoneyGrubScoreUpdate" is not implemented
C:\DOCUME~1\ddd\Desktop\SAMPSE~1\GAMEMO~1\lvdm.pwn(228) : error 029: invalid expression, assumed zero
C:\DOCUME~1\ddd\Desktop\SAMPSE~1\GAMEMO~1\lvdm.pwn(228) : error 004: function "OnPlayerConnect" is not implemented
C:\DOCUME~1\ddd\Desktop\SAMPSE~1\GAMEMO~1\lvdm.pwn(263) : error 004: function "SendPlayerFormattedText" is not implemented
C:\DOCUME~1\ddd\Desktop\SAMPSE~1\GAMEMO~1\lvdm.pwn(264) : error 004: function "SendPlayerFormattedText" is not implemented
C:\DOCUME~1\ddd\Desktop\SAMPSE~1\GAMEMO~1\lvdm.pwn(265) : error 004: function "SendPlayerFormattedText" is not implemented
C:\DOCUME~1\ddd\Desktop\SAMPSE~1\GAMEMO~1\lvdm.pwn(273) : error 079: inconsistent return types (array & non-array)
C:\DOCUME~1\ddd\Desktop\SAMPSE~1\GAMEMO~1\lvdm.pwn(276) : warning 225: unreachable code
C:\DOCUME~1\ddd\Desktop\SAMPSE~1\GAMEMO~1\lvdm.pwn(276) : error 029: invalid expression, assumed zero
C:\DOCUME~1\ddd\Desktop\SAMPSE~1\GAMEMO~1\lvdm.pwn(276) : error 004: function "OnPlayerDisconnect" is not implemented
C:\DOCUME~1\ddd\Desktop\SAMPSE~1\GAMEMO~1\lvdm.pwn(278) : error 017: undefined symbol "reason"
C:\DOCUME~1\ddd\Desktop\SAMPSE~1\GAMEMO~1\lvdm.pwn(282) : error 017: undefined symbol "reason"
C:\DOCUME~1\ddd\Desktop\SAMPSE~1\GAMEMO~1\lvdm.pwn(289) : error 079: inconsistent return types (array & non-array)
C:\DOCUME~1\ddd\Desktop\SAMPSE~1\GAMEMO~1\lvdm.pwn(293) : warning 225: unreachable code
C:\DOCUME~1\ddd\Desktop\SAMPSE~1\GAMEMO~1\lvdm.pwn(293) : error 029: invalid expression, assumed zero
C:\DOCUME~1\ddd\Desktop\SAMPSE~1\GAMEMO~1\lvdm.pwn(293) : error 004: function "OnPlayerCommandText" is not implemented
C:\DOCUME~1\ddd\Desktop\SAMPSE~1\GAMEMO~1\lvdm.pwn(302) : error 017: undefined symbol "strtok"
C:\DOCUME~1\ddd\Desktop\SAMPSE~1\GAMEMO~1\lvdm.pwn(302) : error 033: array must be indexed (variable "cmd")
C:\DOCUME~1\jjoh\kloi\SAMPSE~1\GAMEMO~1\lvdm.pwn(304) : error 017: undefined symbol "cmdtext"
C:\DOCUME~1\ddd\Desktop\SAMPSE~1\GAMEMO~1\lvdm.pwn(319) : error 079: inconsistent return types (array & non-array)
C:\DOCUME~1\ddd\Desktop\SAMPSE~1\GAMEMO~1\lvdm.pwn(327) : error 017: undefined symbol "cmdtext"
C:\DOCUME~1\ddd\Desktop\SAMPSE~1\GAMEMO~1\lvdm.pwn(327) : warning 215: expression has no effect
C:\DOCUME~1\ddd\Desktop\SAMPSE~1\GAMEMO~1\lvdm.pwn(327) : error 001: expected token: ";", but found "]"
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
26 Errors.
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == lojadearmas)
{ // loja
if(IsPlayerInRangeOfPoint(playerid, 10.0, 2002.2496,922.2856,10.8203))
{
GameTextForPlayer(playerid,"~w~ bem vindo", 6000,4); // Game text
if(strcmp(cmd, "/teste123", true) == 0)
{
SendPlayerFormattedText(playerid,"===========================¦Armas¦===========================",0);
SendClientMessage(playerid,COLOR_WHITE,"/conteudo");
SendClientMessage(playerid,COLOR_WHITE,"/conteudo");
SendPlayerFormattedText(playerid,"===========================¦armas===========================", 0);
}
}
}
return 1;
}
Nгo testei..
tente assim. pawn Код:
Nгo entendi ao certo o que vocк queria, mas pelo teu cуdigo jб havia algo errado sem falar que vocк esqueceu de fechar uma chave. |
if(strcmp(cmdtext, "/teste123", true) == 0)
{
if(!PlayerToPoint(1.0,playerid, 2002.2496,922.2856,10.8203 )){
SendClientMessage(playerid,COLOR_WHITE,"Vocк nгo pode usar este comando aqui!!!");
return 1;
}
SendClientMessage(playerid,COLOR_WHITE,"=======================¦Armas¦=======================");
SendClientMessage(playerid,COLOR_WHITE,"/conteudo");
SendClientMessage(playerid,COLOR_WHITE,"/conteudo");
SendClientMessage(playerid,COLOR_WHITE,"=======================¦Armas¦=======================");
return 1;
}
if(pickupid == lojadearmas) {
GameTextForPlayer(playerid,"~w~ bem vindo", 6000,4); // Game text
SendClientMessage(playerid,COLOR_WHITE,"Digite: /Teste123");
return 1;
}
if(strcmp(cmdtext, "/teste123", true) == 0)
{
if(!PlayerToPoint(1.0,playerid, 2002.2496,922.2856,10.8203 )) return SendClientMessage(playerid,COLOR_WHITE,"Vocк nгo pode usar este comando aqui!!!");
SendClientMessage(playerid,COLOR_WHITE,"=======================¦Armas¦=======================");
SendClientMessage(playerid,COLOR_WHITE,"/conteudo");
SendClientMessage(playerid,COLOR_WHITE,"/conteudo");
SendClientMessage(playerid,COLOR_WHITE,"=======================¦Armas¦=======================");
return 1;
}
if(pickupid == lojadearmas)
{
GameTextForPlayer(playerid,"~w~ bem vindo", 6000,4); // Game text
SendClientMessage(playerid,COLOR_WHITE,"Digite: /Teste123");
return 1;
}
C:\DOCUME~1\ddd\Desktop\SAMPSE~1\GAMEMO~1\lvdm.pwn(386) : error 017: undefined symbol "PlayerToPoint"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
if(IsPlayerConnected(playerid))
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposz = (oldposz -z);
//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
}
return 0;
}