new
pName[MAX_PLAYERS_NAME]
;
GetPlayerName(playerid, pName, sizeof(pName));
if(!strcmp(pName, "Kirchhoff", true))
{
MoveObject(objectid, &Float: X, &Float: Y, &Float:Z, &Float: MovingSpeed);
}
else return SendClientMessage(playerid, 0xFFFFFFFF, "<!> You can't open this gate because your name is not Kirchhoff!");
D:\Gta san andreas\GTA San Andreas\server\gamemodes\slrpg.pwn(13934) : error 021: symbol already defined: "PlayerToPoint" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
new Float:oldposx, Float:oldposy, Float:oldposz, Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposz = (oldposz -z);
if(((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) return 1;
return 0;
}
|
Originally Posted by Kirchhoff
ducati09 : good ideea but if i put #include <t-Auto Gates> i get the following error :
Error : Код:
D:\Gta san andreas\GTA San Andreas\server\gamemodes\slrpg.pwn(13934) : error 021: symbol already defined: "PlayerToPoint" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. Код:
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
new Float:oldposx, Float:oldposy, Float:oldposz, Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposz = (oldposz -z);
if(((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) return 1;
return 0;
}
|
, Float:y, Float:z)
i hope works testing now ! AddAutoGate(980,2237.3050,2453.2110,11.421,0.0,0.0,90.00,2237.3050,2453.2110,1.421,"[LCN]Don_Salieri",50);