C:\Documents and Settings\Administrator\щемзп дтбегд\чйцешй гшк\ощзчйн\samp03asvr_R3_win32\gamemodes\grandlarc.pwn(471) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Administrator\щемзп дтбегд\чйцешй гшк\ощзчйн\samp03asvr_R3_win32\gamemodes\grandlarc.pwn(479) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\Administrator\щемзп дтбегд\чйцешй гшк\ощзчйн\samp03asvr_R3_win32\gamemodes\grandlarc.pwn(490) : error 030: compound statement not closed at the end of file (started at line 471)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
3 Errors.
public OnPlayerCommandText(playerid, cmdtext[])
{
new idx;
new cmd[256];
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/enter", true) == 0) {
if(PlayerToPoint(25.0,playerid,1331.5435,-631.6592,109.1349))//LS Outside
{
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Welcome Home!");
SetPlayerPos(playerid, 2003.1180, 2413.1821, 10.8494);
return 1;
}
if(strcmp(cmd, "/exit", true) == 0) {
if(PlayerToPoint(25.0,playerid,2003.1180, 2413.1821, 10.8494))//Inside House
{
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Have A Good-Day!");
SetPlayerPos(playerid, 1331.5435,-631.6592,109.1349);
return 1;
}
return 0;
}
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; }
if(strcmp(cmd, "/enter", true) == 0) { if(PlayerToPoint(25.0,playerid,1331.5435,-631.6592,109.1349))//LS Outside { SendClientMessage(playerid,COLOR_LIGHTBLUE,"Welcome Home!"); SetPlayerPos(playerid, 2003.1180, 2413.1821, 10.8494); } return 1; } if(strcmp(cmd, "/exit", true) == 0) { if(PlayerToPoint(25.0,playerid,2003.1180, 2413.1821, 10.8494))//Inside House { SendClientMessage(playerid,COLOR_LIGHTBLUE,"Have A Good-Day!"); SetPlayerPos(playerid, 1331.5435,-631.6592,109.1349); } return 1; } return 0; }
Originally Posted by armyoftwo
and this at the end of the script
Код:
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; } Код:
if(strcmp(cmd, "/enter", true) == 0) { if(PlayerToPoint(25.0,playerid,1331.5435,-631.6592,109.1349))//LS Outside { SendClientMessage(playerid,COLOR_LIGHTBLUE,"Welcome Home!"); SetPlayerPos(playerid, 2003.1180, 2413.1821, 10.8494); } return 1; } if(strcmp(cmd, "/exit", true) == 0) { if(PlayerToPoint(25.0,playerid,2003.1180, 2413.1821, 10.8494))//Inside House { SendClientMessage(playerid,COLOR_LIGHTBLUE,"Have A Good-Day!"); SetPlayerPos(playerid, 1331.5435,-631.6592,109.1349); } return 1; } return 0; } |
Originally Posted by Taz86[Life's Good Roleplay
]
Quote:
Can be locked |