25.04.2013, 21:06
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;
}
}