Das geht nicht:
C:\Users\Tobias\Desktop\Homeserver\gamemodes\scriptenlernen.pwn(79) : error 017: undefined symbol "Blau"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
Zeile 79: SendClientMessageToAll(playerid,BLAU,string);
Das geht nicht:
C:\Users\Tobias\Desktop\Homeserver\gamemodes\scriptenlernen.pwn(79) : error 017: undefined symbol "Blau"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
Zeile 79: SendClientMessageToAll(playerid,BLAU,string);
Ok also muss ich das %s rausnehmen? Und dann geht das!
Hallo,
Ich lerne Scripten also ich bin noch Anfänger dadrinn.
So zu mein Proplem
Man connectet auf den Server dann geht er aus, ich mache ihn wieder an man connectet er geht wieder aus.
Mein Script:
/*
Scripten Lernen
*/
//Includes
#include <a_samp>
//Farben
#define GELB 0xFFFF00FF
#define ROT 0xFF0005FF
#define BLAU 0x0023FFFF
#define TUERKIS 0x00FFFAFF
//Variabelen
new Variabele = 1, Variabeleleer;
new waffenp;
new array[5];
public OnFilterScriptExit()
{
return 1;
}
main()
{
print("\n----------------------------------");
print("Hier lerne ich Scripten V.0.1");
print("----------------------------------\n");
}
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Scripten Lernen");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
//Pickup
waffenp = CreatePickup(1239,2,1286.3197,-818.0971,84.1406,0);
//Autos
AddStaticVehicle(510,1254.8156,-804.5561,83.7561,177.7327,39,39); // Noobspawn-fahrrad
//Objecte
//3d texte
Create3DTextLabel("Hier ist dein Spawn \n Viel Spaß !", BLAU, 1281.3179,-810.8336,88.3151+0.5, 40.0, 0);
if(array[1] < array[2])
{
OnGameModeExit();
}
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1283.3523,-845.8353,73.3571);
SetPlayerCameraPos(playerid, 1283.3523,-845.8353,73.3571);
SetPlayerCameraLookAt(playerid, 1276.7473,-842.6531,75.1989);
return 1;
}
public OnPlayerConnect(playerid)
{
SendClientMessage(playerid,GELB,"Willkommen beim Scriptenlernen");
SendClientMessageToAll(BLAU,"Der Spieler %s hat den Server betreten");
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
SendClientMessage(playerid,ROT,"Der Spieler %s hat den Server Verlassen");
return 1;
}
public OnPlayerSpawn(playerid)
{
SetPlayerPos(playerid,1275.2880,-798.8099,88.3151);
SetPlayerFacingAngle(playerid,169.7750);
SendClientMessage(playerid,TUERKIS,"Du bist nun gespawnt, Viel Spaß noch!");
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
SendClientMessage(playerid,ROT,"Du wurdest von %s Getötet");
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/help", cmdtext, true, 10) == 0)
{
// Do something here
SendClientMessage(playerid,ROT,"Willkommen in der Hilfe");
SendClientMessage(playerid,BLAU,"/help, /heilen, /spawn");
return 1;
}
if (strcmp("/heilen", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid,100.0);
SendClientMessage(playerid,ROT,"Du hast dich Erfolgreich geheilt");
return 1;
}
if (strcmp("/spawn",cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid,1275.2880,-798.8099,88.3151);
SendClientMessage(playerid,TUERKIS,"Du hast dich Erfolgreich neu gespawnt");
return 1;
}
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)
{
if(pickupid == waffenp)
{
SendClientMessage(playerid,TUERKIS,"Viel Spaß mit deiner Waffe");
GivePlayerWeapon(playerid,30,200);
GivePlayerWeapon(playerid,31,200);
}
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)
{
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;
}