Problems in /enter - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problems in /enter (
/showthread.php?tid=652159)
Problems in /enter -
JaskaranSingh - 04.04.2018
I am using zcmd command /enter to enter the business. It works until the server restart. After the restart, I am not able to enter the business.
PHP код:
CMD:enter(playerid, params[])
{
if(GetPlayerVirtualWorld(playerid) == 0)
{
for(new b = 0; b < sizeof(Business); b++)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, Business[b][BizEntranceX], Business[b][BizEntranceY], Business[b][BizEntranceZ]))
{
// Player[playerid][CurrentID] = b;
curbizid = b;
BizEnter(playerid, curbizid);
break;
}
}
}
else
{
SendClientMessage(playerid, 0xE74C3CFF, "You are already in a building!");
}
return 1;
}
BizEnter Function:
PHP код:
public BizEnter(playerid, bizid)
{
GameTextForPlayer(playerid, "~g~Welcome!", 1500, 1);
switch(Business[bizid][BizInterior])
{
case 1: // 24/7 1
{
printf("This is executing...");
Business[Player[playerid][CurrentID]][BizExitX] = -25.884498;
Business[Player[playerid][CurrentID]][BizExitY] = -185.868988;
Business[Player[playerid][CurrentID]][BizExitZ] = 1003.546875;
SetPlayerPos(playerid, Business[Player[playerid][CurrentID]][BizExitX], Business[Player[playerid][CurrentID]][BizExitY], Business[Player[playerid][CurrentID]][BizExitZ]);
SetPlayerInterior(playerid, 17);
SetPlayerVirtualWorld(playerid, 2);
SetPlayerFacingAngle(playerid, 0.0);
}
}
return 1;
}
This is executing... is not showing up either.
Re: Problems in /enter -
Gameluner - 04.04.2018
What about to try "print("");" command? Because the "f" means formatted.