Guten Morgen Breadfisher,
(gääääääääääääääääääääääähn) ich bin seit ein paar stunden an einer /sperre dran aber ich kriege die korrds nicht richtig hin:
if (strcmp( cmdtext,"/sperre", true )==0)
{
if(!IsACop(playerid))
{
SendClientMessage(playerid, COLOR_GREY,"** Du bist kein Mitglied der Regierung !");
return 1;
}
if(Sperrebit[playerid]==0)
{
if(!IsPlayerInAnyVehicle(playerid))
{
new Float:x,Float:y,Float:z,Float:a;
GetPlayerPos(playerid,x,y,z);
GetPlayerFacingAngle(playerid,a);
GetXYInFrontOfPlayer(playerid,x,y,2.0);
Sperre[playerid][0] = CreateObject(2892,x-2 * floatsin(-a+90, degrees),y+2.0 * floatcos(-a+90, degrees),z-0.5,0,0,a+90);
Sperre[playerid][1] = CreateObject(2892,x-2 * floatsin(-a+90, degrees),y+2.0 * floatcos(-a+90, degrees),z-0.5,0,0,a+90);
Sperre[playerid][2] = CreateObject(1423,x-2 * floatsin(-a+90, degrees),y+4.0 * floatcos(-a+90, degrees),z-0.5,0,0,a+0);
Sperre[playerid][3] = CreateObject(1423,x-2 * floatsin(-a+90, degrees),y-2.0 * floatcos(-a+90, degrees),z-0.5,0,0,a+0);
Sperre[playerid][4] = CreateObject(1423,x-2 * floatsin(-a+90, degrees),y-4.0 * floatcos(-a+90, degrees),z-0.5,0,0,a+0);
Sperre[playerid][5] = CreateObject(1423,x-2 * floatsin(-a+90, degrees),y-4.0 * floatcos(-a+90, degrees),z-0.5,0,0,a+270);
Sperre[playerid][6] = CreateObject(1423,x-2 * floatsin(-a+90, degrees),y-4.0 * floatcos(-a+90, degrees),z-0.5,0,0,a+90.25);
Sperre[playerid][7] = CreateObject(1423,x-2 * floatsin(-a+90, degrees),y-4.0 * floatcos(-a+90, degrees),z-0.5,0,0,a+0);
Sperre[playerid][8] = CreateObject(1423,x-2 * floatsin(-a+90, degrees),y-4.0 * floatcos(-a+90, degrees),z-0.5,0,0,a+0);
Sperre[playerid][9] = CreateObject(1423,x-2 * floatsin(-a+90, degrees),y-4.0 * floatcos(-a+90, degrees),z-0.5,0,0,a+0);
Sperre[playerid][10] = CreateObject(1423,x-2 * floatsin(-a+90, degrees),y-4.0 * floatcos(-a+90, degrees),z-0.5,0,0,a+270);
Sperre[playerid][11] = CreateObject(1423,x-2 * floatsin(-a+90, degrees),y-4.0 * floatcos(-a+90, degrees),z-0.5,0,0,a+0);
Sperrebit[playerid]=1;
SendClientMessage(playerid, COLOR_GREY,"** Straßensperre aufgebaut !");
}
else
{
SendClientMessage(playerid, COLOR_GREY,"** Du bist in einem Fahrzeug, du musst aussteigen um eine Sperre legen zu können !");
}
}
else
{
DestroyObject(Sperre[playerid][0]);
DestroyObject(Sperre[playerid][1]);
DestroyObject(Sperre[playerid][2]);
DestroyObject(Sperre[playerid][3]);
DestroyObject(Sperre[playerid][4]);
DestroyObject(Sperre[playerid][5]);
DestroyObject(Sperre[playerid][6]);
DestroyObject(Sperre[playerid][7]);
DestroyObject(Sperre[playerid][8]);
DestroyObject(Sperre[playerid][9]);
DestroyObject(Sperre[playerid][10]);
DestroyObject(Sperre[playerid][11]);
Sperrebit[playerid]=0;
SendClientMessage(playerid, COLOR_GREY,"** Du hast die Sperre abgebaut !");
}
return 1;
}
CreateObject(2892, -2253.5502929688, 720.31372070313, 48.296875, 0, 0, 90);
CreateObject(2892, -2263.6025390625, 720.43444824219, 48.290794372559, 0, 0, 90);
CreateObject(1423, -2249.880859375, 721.13433837891, 49.001731872559, 0, 0, 0);
CreateObject(1423, -2252.4274902344, 721.12689208984, 49.001731872559, 0, 0, 0);
CreateObject(1423, -2254.9836425781, 721.13031005859, 49.001731872559, 0, 0, 0);
CreateObject(1423, -2256.4807128906, 722.22198486328, 49.0078125, 0, 0, 270);
CreateObject(1423, -2261.0859375, 722.28088378906, 49.0078125, 0, 0, 90.25);
CreateObject(1423, -2262.6123046875, 721.20007324219, 49.001731872559, 0, 0, 0);
CreateObject(1423, -2265.1557617188, 721.19842529297, 49.0078125, 0, 0, 0);
CreateObject(1423, -2267.7131347656, 721.19702148438, 49.0078125, 0, 0, 0);
CreateObject(1423, -2256.4814453125, 724.79016113281, 49.0078125, 0, 0, 270);
CreateObject(1423, -2261.0822753906, 724.82678222656, 49.0078125, 0, 0, 90.247192382813);
Ich schaffe es einfach nicht ... wäre echt nett wenn mir jemand die richtigen daten gibt