Beiträge von Sharpadox
-
-
WEnn ich es so mache, bekomme ich keine Errors
Also versuch es mal so#include <a_samp>
new tanzflaeche[131];
new flaechetanz = 0;public OnGameModeInit()
{
tanzflaeche[0] = CreateObject(19128, -2055.19, 1653.23, 6.10, 0.00, 0.00, 0.00);
//..........
tanzflaeche[130] = CreateObject(19128, -2067.11, 1657.22, 6.10, 0.00, 0.00, 0.00);
}public OnPlayerCommandText(playerid,cmdtext[])
{
if (strcmp("/disco", cmdtext, true, 10) == 0)
{
for(new i = 0; i < sizeof (tanzflaeche); i++)
{
if(flaechetanz == 0)
{
new Float:x,Float:y,Float:z;
GetObjectPos( tanzflaeche[i], x,y,z);
MoveObject( tanzflaeche[i], x,y,z+1,2);
flaechetanz = 1;
}
if(flaechetanz == 1)
{
new Float:x,Float:y,Float:z;
GetObjectPos( tanzflaeche[i], x,y,z);
MoveObject( tanzflaeche[i], x,y,z-1,2);
flaechetanz = 0;
}
}
return 1;
}
return 0;
} -
-
-
Kann man sich damit Wallpapers machen?
Wäre nice -
Zeig mal die Zeilen dadrüber bzw. dadrunter
-
D:\Eigene Dateien\Robert\Sicherung von Speicherkarte Nokia\Games\GT\stunt\gamemodes\dawn.pwn(352) : error 029: invalid expression, assumed zero
D:\Eigene Dateien\Robert\Sicherung von Speicherkarte Nokia\Games\GT\stunt\gamemodes\dawn.pwn(356) : error 029: invalid expression, assumed zero
D:\Eigene Dateien\Robert\Sicherung von Speicherkarte Nokia\Games\GT\stunt\gamemodes\dawn.pwn(356) : warning 215: expression has no effect
D:\Eigene Dateien\Robert\Sicherung von Speicherkarte Nokia\Games\GT\stunt\gamemodes\dawn.pwn(356) : error 001: expected token: ";", but found "if"
D:\Eigene Dateien\Robert\Sicherung von Speicherkarte Nokia\Games\GT\stunt\gamemodes\dawn.pwn(356) : error 029: invalid expression, assumed zero
D:\Eigene Dateien\Robert\Sicherung von Speicherkarte Nokia\Games\GT\stunt\gamemodes\dawn.pwn(356) : fatal error 107: too many error messages on one lineCompilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.
Sorry, hab dir KLammerfehler geschickt. So sollte es gehenpublic streak()
{
for(new i = 0; i<MAX_PLAYERS; i++)
{
if(GetPVarInt(i,"kills")==3)
{
SendClientMessage(i,Orange,"Du hast den 1 Killstreak!");
}
else if(GetPVarInt(i,"kills")==6)
{
SendClientMessage(i,Orange,"Du hast den 2 Killstreak!");
}
else if(GetPVarInt(i,"kills")==8)
{
SendClientMessage(i,Orange,"Du hast den 3 Killstreak!");
}
else if(GetPVarInt(i,"kills")==13)
{
SendClientMessage(i,Orange,"Du hast den 4 Killstreak!");
}
return 1;
}
return 1;
} -
Und ausserdem sind deine Anderen abfrage nichtmehr in der for-Schleife
Versuch es so:public streak()
{
for(new i = 0; i<MAX_PLAYERS; i++)
{
if(GetPVarInt(i,"kills")==3))
{
SendClientMessage(i,Orange,"Du hast den 1 Killstreak!");
}
else if(GetPVarInt(i,"kills")==6))
{
SendClientMessage(i,Orange,"Du hast den 2 Killstreak!");
}
else if(GetPVarInt(i,"kills")==8))
{
SendClientMessage(i,Orange,"Du hast den 3 Killstreak!");
}
else if(GetPVarInt(i,"kills")==13))
{
SendClientMessage(i,Orange,"Du hast den 4 Killstreak!");
}
}
return 1;
} -
Wie meinst du das?
Meinst du es so, wenn man zum Beispiel den Befehl "/haus" eingibt, und NICHT auf ein Haus guckt, steht da zB "Du musst ein Haus ansehen" ? -
Ganz normale Abfragen?
So würde ich es spontan machen
ocmd:mv(playerid,params[])
{
#define MAX_FRAKS 5 //Anzahl der bestehenden Fraktionen
new gvar[MAX_FRAKS];
new Float:oX, Float:oY, Float:oZ;
if(Fraktion[playerid] == 1) // LSPD
{
if(gvar[1] == 0)
{
GetObjectPos(fbitor,oX,oY,oZ);
MoveObjekt(lspdtor,oX,oY,oZ-10,3); //LSPD Tor auf
gvar[1] = 1; // 1 ist die FraktionsID, also LSPD
}
if(gvar[1] == 1)
{
GetObjectPos(fbitor,oX,oY,oZ);
MoveObjekt(lspdtor,oX,oY,oZ+10,3); //LSPD Tor zu
gvar[1] = 0;
}
return 1;
}
if(Fraktion[playerid] == 2) // FBI
{
if(gvar[2] == 0)
{
GetObjectPos(fbitor,oX,oY,oZ);
MoveObjekt(fbitor,oX,oY,oZ-10,3); //FBI Tor auf
gvar[1] = 1; // 1 ist die FraktionsID, also LSPD
}
if(gvar[2] == 1)
{
GetObjectPos(fbitor,oX,oY,oZ);
MoveObjekt(fbitor,oX,oY,oZ+10,3); //FBI Tor zu
gvar[1] = 0;
}
return 1;
}
return 1;
} -
Womit machst du deine Befehle?
strcmp, ocmd, zcmd, dcmd ... ?
-
-
Also das hier hab ich nun in der SA:MP Wiki gefunden, aber ich checks immernoch nicht, wie man eigene natives mit Funktionen macht
Zitatnative
A native function is one defined in the virtual machine (i.e. the
thing which runs the script), not in the script itself. You can only
define native functions if they're coded into SA:MP or a plugin, however
you can create fake natives. Because the native functions from .inc
files are detected by pawno and listed in the box on the right hand side
of pawno it can be useful to use native to get your own custom
functions listed there. A normal native declaration could look like:native printf(const format[], {Float,_}:...);
If you want your own functions to appear without being declared native you can do:
/*
native MyFunction(playerid);
*/PAWNO doesn't recognise comments like that so will add the function
to the list but the compiler does recognise comments like that so will
ignore the declaration.The other interesting thing you can do with native is rename/overload functions:
native my_print(const string[]) = print;
Now the function print doesn't actually exist. It is still in SA:MP,
and the compiler knows it's real name thanks to the "= print" part, but
if you try call it in PAWN you will get an error as you have renamed
print internally to my_print. As print now doesn't exist you can define
it just like any other function:print(const string[])
{
my_print("Someone called print()");
my_print(string);
}Now whenever print() is used in a script your function will be called
instead of the original and you can do what you like. In this case
another message is printed first then the original message. -
Hey,
was bringt die Funktion Native`?
Denn ich wollte mir mal die a_samp.inc anschauen,
doch da drin sind alles nur defines und natives// Util
native print(const string[]);
native printf(const format[], {Float,_}:...);
native format(output[], len, const format[], {Float,_}:...);
native SendClientMessage(playerid, color, const message[]);
native SendClientMessageToAll(color, const message[]);
native SendPlayerMessageToPlayer(playerid, senderid, const message[]);
native SendPlayerMessageToAll(senderid, const message[]);
native SendDeathMessage(killer,killee,weapon);
native GameTextForAll(const string[],time,style);
native GameTextForPlayer(playerid,const string[],time,style);
native SetTimer(funcname[], interval, repeating);
native SetTimerEx(funcname[], interval, repeating, const format[], {Float,_}:...);
native KillTimer(timerid);
native GetTickCount();
native GetMaxPlayers();
native CallRemoteFunction(const function[], const format[], {Float,_}:...);
native CallLocalFunction(const function[], const format[], {Float,_}:...);
native Float:asin(Float:value);
native Float:acos(Float:value);
native Float:atan(Float:value);
native Float:atan2(Float:x, Float:y);// Game
native SetGameModeText(const string[]);
native SetTeamCount(count);
native AddPlayerClass(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
native AddPlayerClassEx(teamid, modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
native AddStaticVehicle(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, color1, color2);
native AddStaticVehicleEx(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, color1, color2, respawn_delay);
native AddStaticPickup(model, type, Float:X, Float:Y, Float:Z, virtualworld = 0);
native CreatePickup(model, type, Float:X, Float:Y, Float:Z, virtualworld = 0);
native DestroyPickup(pickup);
native ShowNameTags(show);
native ShowPlayerMarkers(mode);
native GameModeExit();
native SetWorldTime(hour);
native GetWeaponName(weaponid, const weapon[], len);
native EnableTirePopping(enable);
native AllowInteriorWeapons(allow);
native SetWeather(weatherid);
native SetGravity(Float:gravity);
native AllowAdminTeleport(allow);
native SetDeathDropAmount(amount);
native CreateExplosion(Float:X, Float:Y, Float:Z, type, Float:Radius);
native EnableZoneNames(enable);
native UsePlayerPedAnims(); // Will cause the players to use CJ running/walking animations
native DisableInteriorEnterExits(); // will disable all interior enter/exits in the game.
native SetNameTagDrawDistance(Float:distance); // Distance at which nametags will start rendering on the client.
native DisableNameTagLOS(); // Disables the nametag Line-Of-Sight checking
native LimitGlobalChatRadius(Float:chat_radius);
native LimitPlayerMarkerRadius(Float:marker_radius);// Npc
native ConnectNPC(name[], script[]);
native IsPlayerNPC(playerid); -
-
Lad dir die w_baum.inc runter
-
-
Wie Saboh schon sagte, würde ich auch gerne Vorschlagen, dass du ein Video machst, denn wer weiß, ob du auch wirklich Random machst?
Man kann nie sicher genug sein. -
-
Ich habs nun geschafft, das passwort runterzuladen ..
Jetzt wenn ich die Exe öffne steht da immer:Program too big to fit in memory