13.04.2012, 12:27
Hey, i tried to make Classtext for my Classes.. but i get 6 errors:
Here my script
What's wrong with it?
pawn Код:
C:\Users\Josh\Desktop\SA-MP Server's\Dunno\gamemodes\TDM.pwn(144) : error 017: undefined symbol "Classtext"
C:\Users\Josh\Desktop\SA-MP Server's\Dunno\gamemodes\TDM.pwn(145) : error 017: undefined symbol "Classtext"
C:\Users\Josh\Desktop\SA-MP Server's\Dunno\gamemodes\TDM.pwn(146) : error 017: undefined symbol "Classtext"
C:\Users\Josh\Desktop\SA-MP Server's\Dunno\gamemodes\TDM.pwn(147) : error 017: undefined symbol "Classtext"
C:\Users\Josh\Desktop\SA-MP Server's\Dunno\gamemodes\TDM.pwn(148) : error 017: undefined symbol "Classtext"
C:\Users\Josh\Desktop\SA-MP Server's\Dunno\gamemodes\TDM.pwn(149) : error 017: undefined symbol "Classtext"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
6 Errors.
pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
#include <dfile>
#include <sscanf2>
#include <streamer>
#include <foreach>
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" LS Gang Wars 1.0");
print("----------------------------------\n");
}
#endif
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1;
//Gangs
#define Grove 0
#define Ballas 1
#define Vagos 2
#define Varios 3
#define Rifas 4
#define Lspd 5
#define Rm 6
#define Im 7
#define Hobo 8
#define Hmc 9
//Colors
#define COLOR_WHITE 0xFFFFFFFF
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_LIGHTGREEN 0x9ACD32AA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_ORANGE 0xFFC801C8
#define LIGHTGREEN 0x38FF06FF
#define LIGHTBLUE2 0xF6BB0AA
#define LIGHTBLUE 0x0BBF6AA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_PURPLE 0x800080AA
#define COLOR_BLACK 0x000000AA
#define COLOR_GREEN1 0x33AA33AA
#define COLOR_BROWN 0xA52A2AAA
#define blue 0x375FFFFF
#define BlueMsg 0x0BBF6AA
#define white 0xFFFFFFAA
#define red 0xFF0000AA
#define lightred 0xFB0000AA
#define green 0x33FF33AA
#define yellow 0xFFFF00AA
#define grey 0xC0C0C0AA
#define Green1 0x129E12FF
#define Green2 0x53D212FF
#define blue1 0x2641FEAA
#define orange 0xFF9900AA
#define black 0x2C2727AA
//gTeam
static gTeam[MAX_PLAYERS];
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
//Gangs
AddPlayerClass(105,2532.7859,-1677.8984,19.9302,90.3003,0,0,0,0,0,0); // GSspawn
AddPlayerClass(106,2532.7859,-1677.8984,19.9302,90.3003,0,0,0,0,0,0); // GSspawn
AddPlayerClass(107,2532.7859,-1677.8984,19.9302,90.3003,0,0,0,0,0,0); // GSspawn
//Timers
SetTimer("Messages1",420000,true);
SetTimer("Messages2",600000,true);
SetGameModeText("Gang War DM 1.0");
ShowPlayerMarkers(0);
ShowNameTags(1);
DisableInteriorEnterExits();
EnableStuntBonusForAll(0);
SetNameTagDrawDistance(10.0);
return 1;
}
forward Messages1();
public Messages1()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
SendClientMessage(i, Green1,".::Um dir alle Commands anzuschauen benutze /cmds!::.");
}
return 1;
}
forward Messages2();
public Messages2()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
SendClientMessage(i, Green1,".::Benutze /help wenn du mal nicht weiter WeiЯt!::.");
}
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
case 0..2:
{
SetPlayerPos(playerid, 2534.9429,-1677.6124,19.9302);
SetPlayerCameraPos(playerid, 2531.7803,-1677.6312,19.9302);
SetPlayerCameraLookAt(playerid,2534.9429,-1677.6124,19.9302);
SetPlayerFacingAngle(playerid,89.5052);
TextDrawDestroy(Classtext);
Classtext = TextDrawCreate(170.0, 350.0, "Grove Street");
TextDrawLetterSize(Classtext, 1.5, 2.5);
TextDrawFont(Classtext, 0);
TextDrawColor(Classtext, green);
TextDrawShowForPlayer(playerid,Classtext);
gTeam[playerid] = Grove;
}
case 3..5:
{
gTeam[playerid] = Ballas;
}
case 6..8:
{
gTeam[playerid] = Vagos;
}
case 9..11:
{
gTeam[playerid] = Varios;
}
case 12..14:
{
gTeam[playerid] = Rifas;
}
case 15..18:
{
gTeam[playerid] = Lspd;
}
case 19..20:
{
gTeam[playerid] = Rm;
}
case 21..22:
{
gTeam[playerid] = Im;
}
case 23..25:
{
gTeam[playerid] = Hobo;
}
case 26..28:
{
gTeam[playerid] = Hmc;
}
}
return 1;
}
public OnPlayerConnect(playerid)
{
new pName[MAX_PLAYER_NAME];
new string[48];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "%s hat den Server Betreten.", pName);
SendClientMessageToAll(COLOR_GREEN, string);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new pName[MAX_PLAYER_NAME];
new string[56];
GetPlayerName(playerid, pName, sizeof(pName));
switch(reason)
{
case 0: format(string, sizeof(string), "%s hat den Server verlassen. (Error)", pName);
case 1: format(string, sizeof(string), "%s hat den Server verlassen.", pName);
case 2: format(string, sizeof(string), "%s hat den Server verlassen. (Kick/ban)", pName);
}
SendClientMessageToAll(COLOR_GREEN, string);
return 1;
}
public OnPlayerSpawn(playerid)
{
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}
public OnRconCommand(cmd[])
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnVehicleMod(playerid, vehicleid, componentid)
{
return 1;
}
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
return 1;
}
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_FIRE && ForbiddenWeap(playerid))
{
new weap, ammo;
GetPlayerWeaponData(playerid, 7, weap, ammo);
new pname[MAX_PLAYER_NAME];
new string[170];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "GWD-Anti-Cheat: banning Player: %s - Using Weapon Cheats: (%s) with %d ammo.", pname,weap,ammo); // We format the string,we send the anticheat message with some values: Name of the player,weapon name and ammo.Ex: Test has been banned.Forbidden Weap: RPG with 90 ammo.
SendClientMessageToAll(red,string);
BanEx(playerid,string);
return 1;
}
return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
return 1;
}
public OnPlayerUpdate(playerid)
{
return 1;
}
public OnPlayerStreamIn(playerid, forplayerid)
{
return 1;
}
public OnPlayerStreamOut(playerid, forplayerid)
{
return 1;
}
public OnVehicleStreamIn(vehicleid, forplayerid)
{
return 1;
}
public OnVehicleStreamOut(vehicleid, forplayerid)
{
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
stock ForbiddenWeap(playerid)
{
new weap = GetPlayerWeapon(playerid);
if( weap == 36 || weap == 37 || weap == 38 || weap == 38 || weap == 41 || weap == 42 || weap == 43 || weap == 44 || weap == 45 || weap == 46)
{
return true;
}
return false;
}
//Normal Commands
CMD:kill(playerid, params[])
{
SetPlayerHealth(playerid,0);
return 1;
}
//Admin Commands
CMD:kick(playerid, params[])
{
new id, reason[128];
if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid, COLOR_WHITE, "You need to be a admin to use that command!");
else if(IsPlayerAdmin(id))SendClientMessage(playerid,COLOR_WHITE,"Error: You can not kick another admin!");
else if(sscanf(params, "us", id, reason))SendClientMessage(playerid, COLOR_WHITE, "Usage: /kick [id/name][reason]");
else if (id==INVALID_PLAYER_ID)SendClientMessage(playerid,COLOR_WHITE,"Error: Player is not connected!");
else {
new Name[MAX_PLAYER_NAME], KickMessage[128];
new Name2[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, sizeof(Name));
GetPlayerName(id, Name2, sizeof(Name2));
format(KickMessage, sizeof(KickMessage), "Server Owner: %s(%d) has kicked player %s(%d). [Reason: %s]", Name, playerid, Name2, id, reason);
SendClientMessageToAll(red, KickMessage);
Kick(id);
}
return 1;
}
CMD:ban(playerid, params[])
{
new id, reason[128];
if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid, COLOR_WHITE, "You need to be a admin to use that command!");
else if(IsPlayerAdmin(id))SendClientMessage(playerid,COLOR_WHITE,"Error: You can not ban another admin!");
else if(sscanf(params, "us", id, reason))SendClientMessage(playerid, COLOR_WHITE, "Usage: /ban [id/name][reason]");
else if (id==INVALID_PLAYER_ID)SendClientMessage(playerid,COLOR_WHITE,"Error: Player is not connected!");
else {
new Name[MAX_PLAYER_NAME], KickMessage[128];
new Name2[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, sizeof(Name));
GetPlayerName(id, Name2, sizeof(Name2));
format(KickMessage, sizeof(KickMessage), "Server Owner: %s(%d) has Banned player %s(%d). [Reason: %s]", Name, playerid, Name2, id, reason);
SendClientMessageToAll(red, KickMessage);
Ban(id);
}
return 1;
}