26.09.2011, 19:58
I have got this from another thread and tried to make into filterscript to work with ladmin, but i cant do it ,
can someone tell me where its gone wrong im guessing ive got it totally wrong
code i robbed i just need it to work with ladmin
Errors
EDIT: i think i no why the the text is not working because i have it in wrong area
can someone tell me where its gone wrong im guessing ive got it totally wrong
code i robbed i just need it to work with ladmin
pawn Код:
// 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 );
}
}
pawn Код:
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.