Guten Abend.
Ich habe ein Problem bei den Fraktionstoren:
enum für die Fraktionen:
enum frakteEnum{
f_name[300],
Float:f_x,
Float:f_y,
Float:f_z,
Float:f_r,
f_inter,
f_world,
f_color
}
finfo:
new fInfo[][frakteEnum] ={
{"zivi",0.0,0.0,0.0,0.0,0,0,weiß}, //zivi //0= 1
{"LVPD",2286.9927,2431.6108,10.8203,176.4932,0,0,dunkelblau}, //LVPD 1 = 2
{"SWAT",-2719.8411,-318.3455,7.8438,46.7307,0,0,helblau}, //SWAT
{"FBI",-1606.3145,712.2166,13.8672,14.9407,0,0,duneklhelblau}, //FBI
{"ARMY",245.4032,1859.6956,14.0840,86.8001,0,0,hellgrün}, //ARMY
{"Medic/Feuerwehr",-319.8502,1049.1862,20.3403,351.6078,0,0,rot}, //MEDIC/FEUERWEHR
{"FAHRSCHULE",662.8862,1716.9479,7.1875,37.0085,0,0,orange}, //FAHRSCHULE
{"Aztecas",1531.2836,751.6505,11.0234,265.7675,0,0,türkis}, //Aztecas
{"VAGOS",-2280.8035,2288.0842,4.9590,285.9662,0,0,gelb}, //VAGOS
{"BALLAS",1457.6174,2772.6257,10.8203,263.1655,0,0,pink}, //BALLAS
{"YAKUZA",1956.0493,729.8642,10.8203,106.5192,0,0,grau}// YAKUZA
};
PlayerSpawn:
isPlayerInFrakt(playerid,f_id){
if(sInfo[playerid][fraktion]==f_id)return 1;
return 0;
}
public OnPlayerSpawn(playerid)
{
if(!isPlayerInFrakt(playerid,0))
{
if(sInfo[playerid][spawnchange]==1)
{
new fID;
fID= sInfo[playerid][fraktion];
SetPlayerPos(playerid,fInfo[fID][f_x],fInfo[fID][f_y],fInfo[fID][f_z]);
SetPlayerFacingAngle(playerid,fInfo[fID][f_r]);
SetPlayerInterior(playerid,fInfo[fID][f_inter]);
SetPlayerVirtualWorld(playerid,fInfo[fID][f_world]);
SetPlayerColor(playerid,fInfo[fID][f_color]);
}
}
return 1;
}
Tor fürs lvpd:
/*torauf:
CreateObject(980, 1158.38025, -1310.79846, 3.60545, 0.00000, 0.00000, 59.31096);*/
//ocmd Befehle:
ocmd:torzu(playerid,params)
{
if(!isPlayerInFrakt(playerid,1))return
SendClientMessage(playerid,rot,"Du bist nicht in der Fraktion");
{
MoveObject(testtor,1158.38025, -1310.79846, 10.26259,2,0.00000, 0.00000, 59.31096 );
SendClientMessage(playerid,grün,"Du hast das Tor zu gemacht!");
return 1;
}
}
ocmd:torauf(playerid,params)
{
if(!isPlayerInFrakt(playerid,1))return
SendClientMessage(playerid,rot,"Du bist nicht in der Fraktion!");
{
MoveObject(testtor,1158.38025, -1310.79846, 3.60545,3);
//MovePlayerObject(playerid,980,1158.38025, -1310.79846, 4.6154,10,0.0000,0.0000,59.3110);
SendClientMessage(playerid,grün,"Das Tor wurde geöffnent!");
return 1;
}
}
wenn ich als LVPD mache sagt er mir immer:
SendClientMessage(playerid,rot,"Du bist nicht in der Fraktion!");
Ich frage mich nur wieso der mich nicht als fraktion LVPD ansieht.