Hallo Leute,
ich habe zurzeit ein kleines Problem mit meinem Script.
Und zwar:
Wenn ich mich eingeloggt habe werde ich an den Punkt gebracht wo ich die Klasse aussuchen kann. (Habe das mit gTeam usw gemacht).
Nur leider sehe ich dort keinen Charakter bzw nichtmal die namen wie SWAT sondern nur die umgebung.
Hier mal ein kleiner screen:
Ich hoffe man kann mir helfen! Hier Pawn code:
http://img34.imageshack.us/img34/4011/samp722.png
//Keks: Expander
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
static gTeam[MAX_PLAYERS]; // Tracks the team assignment for each player
new gPlayerClass[MAX_PLAYERS];
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_DARKRED 0x660000AA
#define COLOR_ORANGE 0xFF9900AA
main() { }
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
AddPlayerClass(285,277.5832,1938.0027,17.6406,171.6869,29,500,23,200,16,50); //
AddPlayerClass(287,355.6907,2024.2633,22.6335,190.9455,31,400,35,20,27,120); //
AddPlayerClass(98,239.5395,1861.0515,14.0840,356.8289,30,400,26,20,18,50); //
AddPlayerClass(108,157.1099,1903.1987,18.6533,270.6614,22,300,28,500,18,50); //
AddPlayerClass(100,165.1367,1849.7363,25.4985,270.6380,24,300,25,200,32,500); //
AddPlayerClass(165,194.3530,1940.3219,17.6406,270.2925,34,200,23,300,44,1); //
AddStaticVehicle(470,328.2616,1918.2671,17.6400,274.2052,43,0); // HUMMER
AddStaticVehicle(470,326.6069,1908.9470,17.6440,269.7771,43,0); // HUMMER
AddStaticVehicle(470,327.2154,1900.5107,17.6452,266.7778,43,0); // HUMMER
AddStaticVehicle(470,326.9056,1891.6177,17.6464,269.1013,43,0); // HUMMER
AddStaticVehicle(427,280.2883,1943.7570,17.7726,268.7399,0,1); // ENFORCER
AddStaticVehicle(425,-110.7913,1798.6071,21.7459,184.4099,43,0); // hunter 1
AddStaticVehicle(425,500.2362,1985.8420,55.7088,86.8116,43,0); // hunter 2
AddStaticVehicle(432,281.8207,1791.6289,17.7531,181.3697,43,0); // panzer 1
AddStaticVehicle(432,178.7931,2086.2471,22.7640,171.1629,43,0); // panzer 2
AddStaticVehicle(432,213.3970,1856.9537,13.1870,3.1696,43,0); // panzer 3
AddStaticVehicle(470,193.6055,1921.1580,17.6424,87.8423,43,0); // HUMMER
AddStaticVehicle(470,202.3672,1921.3779,17.6492,90.5483,43,0); // HUMMER
AddStaticVehicle(470,209.5876,1921.4506,17.6451,90.5494,43,0); // HUMMER
AddStaticVehicle(470,219.9430,1921.5547,17.6468,90.3866,43,0); // HUMMER
AddStaticVehicle(520,325.5674,2541.4631,17.6748,180.9843,1,6); // EXTRA HYDRA
AddStaticVehicle(476,421.4529,2488.5173,17.1300,89.0771,89,91); // rustler
UsePlayerPedAnims();
// All your cars, spawns, etc.
SetTeamCount(6);
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerClass(playerid, classid);
gPlayerClass[playerid] = classid;
GameTextForPlayer(playerid, "~g~SWAT", 500, 3);
GameTextForPlayer(playerid, "~g~Army", 500, 3);
GameTextForPlayer(playerid, "~g~Terrorist", 500, 3);
GameTextForPlayer(playerid, "~g~Gang", 500, 3);
GameTextForPlayer(playerid, "~g~Rocker", 500, 3);
GameTextForPlayer(playerid, "~g~CIA", 500, 3);
}
}
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
// First we need to see what classid a player got
SetPlayerInterior(playerid,0);
if(gTeam[playerid] == TEAM_SWAT) {
SetPlayerColor(playerid,COLOR_GREEN); // Green
else if(gTeam[playerid] == TEAM_ARMY) {
SetPlayerColor(playerid,COLOR_RED); // Red
else if(gTeam[playerid] == TEAM_TERRORIST) {
SetPlayerColor(playerid,COLOR_YELLOW); // Yellow
else if(gTeam[playerid] == TEAM_GANG) {
SetPlayerColor(playerid,COLOR_PINK); // Pink
else if(gTeam[playerid] == TEAM_ROCKER) {
SetPlayerColor(playerid,COLOR_BLUE); // Blue
else if(gTeam[playerid] == TEAM_CIA) {
SetPlayerColor(playerid,COLOR_LIGHTBLUE); // Light Blue
}
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 OnPlayerPrivmsg(playerid, recieverid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
{
if (strcmp("/chainsaw", cmdtext, true,10) == 0)
{
GivePlayerWeapon(playerid, 9, 0);
return 1;//return vergessen ;)
}
if (strcmp("/grenade", cmdtext, true,10) == 0)
{
GivePlayerWeapon(playerid, 16, 50);
return 1;//return vergessen ;)
}
if (strcmp("/molotov", cmdtext, true) == 0)
{
GivePlayerWeapon(playerid, 18, 50);
return 1;//return vergessen ;)
}
if (strcmp("/glock", cmdtext, true) == 0)
{
GivePlayerWeapon(playerid, 22, 200);
return 1;//return vergessen ;)
}
if (strcmp("/silenced", cmdtext, true) == 0)
{
GivePlayerWeapon(playerid, 23, 200);
return 1;//return vergessen ;)
}
if (strcmp("/deagle", cmdtext, true) == 0)
{
GivePlayerWeapon(playerid, 24, 200);
return 1;//return vergessen ;)
}
if (strcmp("/shotgun", cmdtext, true) == 0)
{
GivePlayerWeapon(playerid, 25, 200);
return 1;//return vergessen ;)
}
if (strcmp("/sawnoff", cmdtext, true) == 0)
{
GivePlayerWeapon(playerid, 26, 200);
return 1;//return vergessen ;)
}
if (strcmp("/combat", cmdtext, true) == 0)
{
GivePlayerWeapon(playerid, 27, 200);
return 1;//return vergessen ;)
}
if (strcmp("/uzi", cmdtext, true) == 0)
{
GivePlayerWeapon(playerid, 28, 200);
return 1;//return vergessen ;)
}
if (strcmp("/mp5", cmdtext, true) == 0)
{
GivePlayerWeapon(playerid, 29, 200);
return 1;//return vergessen ;)
}
if (strcmp("/ak47", cmdtext, true) == 0)
{
GivePlayerWeapon(playerid, 30, 200);
return 1;//return vergessen ;)
}
if (strcmp("/m4", cmdtext, true) == 0)
{
GivePlayerWeapon(playerid, 31, 200);
return 1;//return vergessen ;)
}
if (strcmp("/tec9", cmdtext, true) == 0)
{
GivePlayerWeapon(playerid, 32, 200);
return 1;//return vergessen ;)
}
if (strcmp("/sniper", cmdtext, true) == 0)
{
GivePlayerWeapon(playerid, 34, 200);
return 1;//return vergessen ;)
}
if (strcmp("/nightvision", cmdtext, true) == 0)
{
GivePlayerWeapon(playerid, 44, 1);
return 1;//return vergessen ;)
}
if (strcmp("/thermal", cmdtext, true) == 0)
{
GivePlayerWeapon(playerid, 45, 1);
return 1;//return vergessen ;)
}
if (strcmp(cmdtext, "/rules", true) == 0)
{
// Send a message to everyone.
SendClientMessageToAll(0xff000000, "Welcome to Area 51 DM!");
SendClientMessageToAll(0xff000000, "Please don't cheat,hack or swear and respect other players");
SendClientMessageToAll(0xff000000, "If you need more Weapons use this commands:");
SendClientMessageToAll(0xff000000, "/chainsaw /grenade /molotov /uzi /mp5 /silenced /glock /deagle /tec9");
SendClientMessageToAll(0xff000000, "/sniper /nightvision /thermal /Shotgun /m4 /ak47 /sawnoff /combat");
SendClientMessageToAll(0xff000000, "Have fun! If you have any Problems call for Admins");
return 1;
}
return 0;
}
return 1;
}
public OnPlayerInfoChange(playerid)
{
return 1;
}
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 OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}
SetPlayerClass(playerid, classid) {
gTeam[playerid] = TEAM_SWAT;
} else if(classid == 1) {
gTeam[playerid] = TEAM_ARMY;
} else if(classid == 2) {
gTeam[playerid] = TEAM_TERRORIST;
} else if(classid == 3) {
gTeam[playerid] = TEAM_GANG;
} else if(classid == 4) {
gTeam[playerid] = TEAM_ROCKER;
} else if(classid == 5) {
gTeam[playerid] = TEAM_CIA;
}
}
edit: sry wusste nicht wie expander geht