Public problem - 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: Public problem (
/showthread.php?tid=624083)
Public problem -
TheDarkBlade - 10.12.2016
Код:
xmania4.pwn(52495) : warning 213: tag mismatch
xmania4.pwn(52495) : warning 202: number of arguments does not match definition
xmania4.pwn(52504) : warning 213: tag mismatch
xmania4.pwn(52504) : error 035: argument type mismatch (argument 2)
PHP код:
forward TextdrawUpdate(textdraw,const string[]);
public TextdrawUpdate(textdraw,const string[])
{
TextDrawSetString(textdraw,string);
return 1; // 52495
}
Re: Public problem -
Konstantinos - 10.12.2016
Unless it is called by a timer, the function has no purpose.
About the warnings, add
Text: tag to the first parameter and remove
const from the second.
Re: Public problem -
TheDarkBlade - 10.12.2016
Now just not to make another topic , i need have a new issue with my texdraw .
I am using a textdraw to keep track of the number of players who joined the event.
Well the problem is that once i use the join command the textdraw dissapears . The strange thing is that if i activate the textdraw and teleport somewhere the textdraws remains intact but if i use the command it dissapears .
PHP код:
CMD:joinevent(playerid,params[])
{
new rand= random(sizeof(DMpos));
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login pin.");
if(PlayerInfo[playerid][pWantedLevel] != 0) return SendClientMessage(playerid, COLOR_ERROR, "Nu poti participa la event deoarece ai wanted!");
if(IsPlayerConnected(playerid))
{
new string[128];
PartEvent[playerid] = 1;
SetPlayerInterior(playerid,1);
SetPlayerVirtualWorld(playerid,0);
SetPlayerPos(playerid,DMpos[rand][0],DMpos[rand][1],DMpos[rand][2]);
SetPlayerFacingAngle(playerid,DMpos[rand][3]);
SetPlayerHealth(playerid,99);
GivePlayerWeaponEx(playerid,EventWeapon,500);
TogglePlayerControllable(playerid,0);
EventPlayers++;
format(string,sizeof(string),"%d s-au inscris in event ",EventPlayers);
TextDrawSetString(EventTXD,string);
CountDownEventTimer = SetTimer("CountDownEvent", 60000, false);
}
return 1;
}
EDIT:
Tryed the oldschool debug metod
for some reason the messages are not printed in the log.
Edit 2 :
Replaced the print function with SendClentMessage and all the messages show . so i really do not have any ideea .
Re: Public problem -
OneDay - 11.12.2016
You have TextDrawSetString but no TextDrawShowForPlayer.
Re: Public problem -
TheDarkBlade - 11.12.2016
The string is shown to the player on OnPlayerConnect
Re: Public problem -
TheDarkBlade - 11.12.2016
anyone ?
Re: Public problem -
Yaa - 13.12.2016
PHP код:
CMD:joinevent(playerid,params[])
{
new rand= random(sizeof(DMpos));
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login pin.");
if(PlayerInfo[playerid][pWantedLevel] != 0) return SendClientMessage(playerid, COLOR_ERROR, "Nu poti participa la event deoarece ai wanted!");
if(IsPlayerConnected(playerid))
{
new string[128];
PartEvent[playerid] = 1;
SetPlayerInterior(playerid,1);
SetPlayerVirtualWorld(playerid,0);
SetPlayerPos(playerid,DMpos[rand][0],DMpos[rand][1],DMpos[rand][2]);
SetPlayerFacingAngle(playerid,DMpos[rand][3]);
SetPlayerHealth(playerid,99);
GivePlayerWeaponEx(playerid,EventWeapon,500);
TogglePlayerControllable(playerid,0);
EventPlayers++;
format(string,sizeof(string),"%d s-au inscris in event ",EventPlayers);
TextDrawSetString(EventTXD,string);
TextDrawHideForAll(EventTXD);
TextDrawShowForAll(EventTXD);
CountDownEventTimer = SetTimer("CountDownEvent", 60000, false);
}
return 1;
}
D:
just a think ;O