Tag mismatch.. (HELP BUG.) -
Strier - 25.04.2013
pawn Код:
CMD:superid(playerid, params[])
// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
new bool:superidof[MAX_PLAYERS] = false;
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
public OnPlayerConnect()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
superidof[i] = false;
}
return 1;
}
public OnPlayerDisconnect()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
superidof[i] = false;
}
return 1;
}
public OnPlayerSpawn(playerid)
{
superidof[playerid] = false;
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
CMD:superid(playerid, params[])
{
new str[256], Float:Pos[4], PlayerText3D:label;
if(superidof[playerid] == false)
{
superidof[playerid] = true;
SendClientMessage(playerid, 0xFF4435FF, "You've turned ON the Superid!");
for(new i = 0; i < MAX_PLAYERS; i++)
{
GetPlayerPos(i, Pos[1], Pos[2], Pos[3]);
i = playerid;
format(str, 256, "ID: %i", i);
CreatePlayer3DTextLabel(i, str, 0xFF6642FF, Pos[1], Pos[2], Pos[3], 200.0, -1, 1);
}
}
if(superidof[playerid] == true)
{
superidof[playerid] = false;
SendClientMessage(playerid, 0xFF4435FF, "You've turned OFF the Superid!");
for(new i = 0; i < MAX_PLAYERS; i++)
{
DeletePlayer3DTextLabel(i, label);
}
}
return 1;
}
}
When i turn it on, i can't use any command like the server freezes or smthing, whys so?
Re: Tag mismatch.. (HELP BUG.) -
nor15 - 25.04.2013
PHP код:
CMD:superid(playerid, params[])
// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
new bool:superidof[MAX_PLAYERS] = false;
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
public OnPlayerConnect()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
superidof[i] = false;
}
return 1;
}
public OnPlayerDisconnect()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
superidof[i] = false;
}
return 1;
}
public OnPlayerSpawn(playerid)
{
superidof[playerid] = false;
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
CMD:superid(playerid, params[])
{
new str[256], Float:Pos[4], PlayerText3D:label;
if(superidof[playerid] == false)
{
superidof[playerid] = true;
SendClientMessage(playerid, 0xFF4435FF, "You've turned ON the Superid!");
for(new i = 0; i < MAX_PLAYERS; i++)
{
GetPlayerPos(i, Pos[1], Pos[2], Pos[3]);
i = playerid;
format(str, 256, "ID: %i", i);
CreatePlayer3DTextLabel(i, str, 0xFF6642FF, Pos[1], Pos[2], Pos[3], 200.0, -1, 1);
}
}
if(superidof[playerid] == true)
{
superidof[playerid] = false;
SendClientMessage(playerid, 0xFF4435FF, "You've turned OFF the Superid!");
for(new i = 0; i < MAX_PLAYERS; i++)
{
DeletePlayer3DTextLabel(i, label);
}
}
return 1;
}
try this
Respuesta: Tag mismatch.. (HELP BUG.) -
Strier - 25.04.2013
Still not working.
AW: Tag mismatch.. (HELP BUG.) -
HurtLocker - 25.04.2013
Bools, by default, if not defined are false, so there's no need to make them false again onplayerconnect. Try this:
pawn Код:
#include <a_samp>
#include <zcmd>
new bool: superidof[MAX_PLAYERS];
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
public OnPlayerDisconnect(playerid)
{
superidof[playerid] = false;
}
return 1;
}
public OnPlayerSpawn(playerid)
{
superidof[playerid] = false;
return 1;
}
CMD:superid(playerid, params[])
{
new str[256], Float:Pos[3], PlayerText3D:label[MAX_PLAYERS]; //I am not sure about this
if(superidof[playerid] == false)
{
superidof[playerid] = true;
SendClientMessage(playerid, 0xFF4435FF, "You've turned ON the Superid!");
for(new i = 0; i < MAX_PLAYERS; i++)
{
GetPlayerPos(i, Pos[0], Pos[1], Pos[2]);
format(str, 256, "ID: %i", i); //use somewhere this string
CreatePlayer3DTextLabel(i, str, 0xFF6642FF, Pos[0], Pos[1], Pos[2], 200.0, -1, 1);
}
}
else
{
superidof[playerid] = false;
SendClientMessage(playerid, 0xFF4435FF, "You've turned OFF the Superid!");
for(new i = 0; i < MAX_PLAYERS; i++)
{
DeletePlayer3DTextLabel(i, PlayerText3D:label[i]);
}
}
return 1;
}