// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT
#define PlayerInfo
#include <a_samp>
#if defined FILTERSCRIPT
new Text3D:ADMIN;
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
ADMIN = Create3DTextLabel("Admin ON-DUTY", 0xFFFFFFFF, 999.99, 999.99, 999.99 )
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/adminduty", true) == 0 || strcmp(cmdtext, "/aduty", true) == 0)
{
new PlayerText3D: textAdmin;
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][ladmin] > 0)
{
if(AdminDuty[playerid] == 0)
{
AdminDuty[playerid] = 1;
SetPlayerSkin(playerid,0);
SetPlayerArmour(playerid, 999);
SetPlayerHealth(playerid, 999);
SetPlayerColor(playerid,TEAM_ADMIN_COLOR);
GetPlayerName(playerid, sendername, sizeof(sendername));
textAdmin = Attach3DTextLabelToPlayer( ADMIN, playerid, 0.0, 0.0, 3.0 );
format(string, sizeof(string), "Admin [ID: %d] %s is now ON duty",playerid, sendername);
SendClientMessageToAll(COLOR_RED,string);
return 1;
}
else if(AdminDuty[playerid] == 1)
{
AdminDuty[playerid] = 0;
SetPlayerSkin(playerid,PlayerInfo[playerid][pModel]);
SetPlayerArmour(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerToTeamColor(playerid);
GetPlayerName(playerid, sendername, sizeof(sendername));
DeletePlayer3DTextLabel( playerid, textAdmin );
format(string, sizeof(string), "Admin [ID: %d] %s is now OFF duty",playerid, sendername);
SendClientMessageToAll(COLOR_WHITE,string);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You Are Not Admin");
return 1;
}
}
return ( 1 );
}
}
C:\Documents and Settings\BaLLy\Desktop\LONG HAUL TRUCKING\filterscripts\aduty.pwn(17) : error 010: invalid function or declaration
C:\Documents and Settings\BaLLy\Desktop\LONG HAUL TRUCKING\filterscripts\aduty.pwn(43) : error 029: invalid expression, assumed zero
C:\Documents and Settings\BaLLy\Desktop\LONG HAUL TRUCKING\filterscripts\aduty.pwn(43) : warning 215: expression has no effect
C:\Documents and Settings\BaLLy\Desktop\LONG HAUL TRUCKING\filterscripts\aduty.pwn(43) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\BaLLy\Desktop\LONG HAUL TRUCKING\filterscripts\aduty.pwn(43) : error 029: invalid expression, assumed zero
C:\Documents and Settings\BaLLy\Desktop\LONG HAUL TRUCKING\filterscripts\aduty.pwn(43) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.
ADMIN = Create3DTextLabel("Admin ON-DUTY", 0xFFFFFFFF, 999.99, 999.99, 999.99 );
//and why the hell you got return ( 1 );
return ( 1 ); TO return 1;
// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT
#define PlayerInfo
#include <a_samp>
#if defined FILTERSCRIPT
new Text3D:ADMIN;
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
ADMIN = Create3DTextLabel("Admin ON-DUTY", 0xFFFFFFFF, 999.99, 999.99, 999.99 );
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/adminduty", true) == 0 || strcmp(cmdtext, "/aduty", true) == 0)
{
new PlayerText3D: textAdmin;
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][ladmin] > 0)
{
if(AdminDuty[playerid] == 0)
{
AdminDuty[playerid] = 1;
SetPlayerSkin(playerid,0);
SetPlayerArmour(playerid, 999);
SetPlayerHealth(playerid, 999);
SetPlayerColor(playerid,TEAM_ADMIN_COLOR);
GetPlayerName(playerid, sendername, sizeof(sendername));
textAdmin = Attach3DTextLabelToPlayer( ADMIN, playerid, 0.0, 0.0, 3.0 );
format(string, sizeof(string), "Admin [ID: %d] %s is now ON duty",playerid, sendername);
SendClientMessageToAll(COLOR_RED,string);
return 1;
}
else if(AdminDuty[playerid] == 1)
{
AdminDuty[playerid] = 0;
SetPlayerSkin(playerid,PlayerInfo[playerid][pModel]);
SetPlayerArmour(playerid, 0);
SetPlayerHealth(playerid, 100);
SetPlayerToTeamColor(playerid);
GetPlayerName(playerid, sendername, sizeof(sendername));
DeletePlayer3DTextLabel( playerid, textAdmin );
format(string, sizeof(string), "Admin [ID: %d] %s is now OFF duty",playerid, sendername);
SendClientMessageToAll(COLOR_WHITE,string);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You Are Not Admin");
return 1;
}
}
return 1;
}
}
//#define PlayerInfo //WTF????!
#include <a_samp>
#include <streamer>
new Text3D:ADMIN[MAX_PLAYERS], AdminDuty[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
ADMIN[playerid] = CreateDynamic3DTextLabel("_", 0xFFFFFF00, 0.0, 0.0, 0.5, 150.0, playerid, INVALID_VEHICLE_ID);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
DestroyDynamic3DTextLabel(ADMIN[playerid]);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/adminduty", true) || !strcmp(cmdtext, "/aduty", true))
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][Level] > 0)
{
new str[128];
if(AdminDuty[playerid] == 0)
{
AdminDuty[playerid] = 1;
SetPVarInt(playerid, "SAVEDskin", GetPlayerSkin(playerid));
SetPlayerSkin(playerid, 0);
SetPlayerArmour(playerid, 999.0);
SetPlayerHealth(playerid, 999.0);
GetPlayerName(playerid, str, sizeof(str));
UpdateDynamic3DTextLabelText(ADMIN[playerid], 0xFFFFFFFF, "Admin ON-DUTY");
format(str, sizeof(str), "Admin [ID: %d] %s is now ON duty",playerid, str);
SendClientMessageToAll(COLOR_RED,str);
return 1;
}
else if(AdminDuty[playerid] == 1)
{
AdminDuty[playerid] = 0;
SetPlayerSkin(playerid, GetPVarInt(playerid, "SAVEDskin"));
SetPlayerArmour(playerid, 0.0);
SetPlayerHealth(playerid, 100.0);
GetPlayerName(playerid, str, sizeof(str));
UpdateDynamic3DTextLabelText(ADMIN[playerid], 0xFFFFFF00, "_");
format(str, sizeof(str), "Admin [ID: %d] %s is now OFF duty", playerid, str);
SendClientMessageToAll(COLOR_WHITE,str);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You Are Not Admin");
return 1;
}
}
return 1;
}
return 0;
}
pawn Код:
It also uses Incognito's Streamer plugin |