Hi Leute,
Ich wollte mir ein Vorschauscript machen indem man sich Objekte anschauen kann.Die Objekte sollen aber auch wieder verschwinden.
//Bei OnPlayerkeyStateChange
if(newkeys==KEY_ANALOG_RIGHT)
{
new listnumber=1;
new ParkZaeune[16];
if(listnumber==1)
{
listnumber=2;
ParkZaeune[0]=CreatePlayerObject (playerid,HitmanZaun1Ids[0], HitmanZaun1[0][0], HitmanZaun1[0][1], HitmanZaun1[0][2], HitmanZaun1[0][3], HitmanZaun1[0][4], HitmanZaun1[0][5]);
ParkZaeune[1]=CreatePlayerObject (playerid,HitmanZaun1Ids[1], HitmanZaun1[1][0], HitmanZaun1[1][1], HitmanZaun1[1][2], HitmanZaun1[0][3], HitmanZaun1[0][4], HitmanZaun1[1][5]);
ParkZaeune[2]=CreatePlayerObject (playerid,HitmanZaun1Ids[2], HitmanZaun1[2][0], HitmanZaun1[2][1], HitmanZaun1[2][2], HitmanZaun1[0][3], HitmanZaun1[0][4], HitmanZaun1[2][5]);
ParkZaeune[3]=CreatePlayerObject (playerid,HitmanZaun1Ids[3], HitmanZaun1[3][0], HitmanZaun1[3][1], HitmanZaun1[3][2], HitmanZaun1[0][3], HitmanZaun1[0][4], HitmanZaun1[3][5]);
ParkZaeune[4]=CreatePlayerObject (playerid,HitmanZaun1Ids[4], HitmanZaun1[4][0], HitmanZaun1[4][1], HitmanZaun1[4][2], HitmanZaun1[0][3], HitmanZaun1[0][4], HitmanZaun1[4][5]);
ParkZaeune[5]=CreatePlayerObject (playerid,HitmanZaun1Ids[5], HitmanZaun1[5][0], HitmanZaun1[5][1], HitmanZaun1[5][2], HitmanZaun1[0][3], HitmanZaun1[0][4], HitmanZaun1[5][5]);
ParkZaeune[6]=CreatePlayerObject (playerid,HitmanZaun1Ids[6], HitmanZaun1[6][0], HitmanZaun1[6][1], HitmanZaun1[6][2], HitmanZaun1[0][3], HitmanZaun1[0][4], HitmanZaun1[6][5]);
ParkZaeune[7]=CreatePlayerObject (playerid,HitmanZaun1Ids[7], HitmanZaun1[7][0], HitmanZaun1[7][1], HitmanZaun1[7][2], HitmanZaun1[0][3], HitmanZaun1[0][4], HitmanZaun1[7][5]);
ParkZaeune[8]=CreatePlayerObject (playerid,HitmanZaun1Ids[8], HitmanZaun1[8][0], HitmanZaun1[8][1], HitmanZaun1[8][2], HitmanZaun1[0][3], HitmanZaun1[0][4], HitmanZaun1[8][5]);
ParkZaeune[9]=CreatePlayerObject (playerid,HitmanZaun1Ids[9], HitmanZaun1[9][0], HitmanZaun1[9][1], HitmanZaun1[9][2], HitmanZaun1[0][3], HitmanZaun1[0][4], HitmanZaun1[9][5]);
ParkZaeune[10]=CreatePlayerObject (playerid,HitmanZaun1Ids[10], HitmanZaun1[10][0], HitmanZaun1[10][1], HitmanZaun1[10][2], HitmanZaun1[0][3], HitmanZaun1[0][4], HitmanZaun1[10][5]);
ParkZaeune[11]=CreatePlayerObject (playerid,HitmanZaun1Ids[11], HitmanZaun1[11][0], HitmanZaun1[11][1], HitmanZaun1[11][2], HitmanZaun1[0][3], HitmanZaun1[0][4], HitmanZaun1[11][5]);
ParkZaeune[12]=CreatePlayerObject (playerid,HitmanZaun1Ids[12], HitmanZaun1[12][0], HitmanZaun1[12][1], HitmanZaun1[12][2], HitmanZaun1[0][3], HitmanZaun1[0][4], HitmanZaun1[12][5]);
ParkZaeune[13]=CreatePlayerObject (playerid,HitmanZaun1Ids[13], HitmanZaun1[13][0], HitmanZaun1[13][1], HitmanZaun1[13][2], HitmanZaun1[0][3], HitmanZaun1[0][4], HitmanZaun1[13][5]);
ParkZaeune[14]=CreatePlayerObject (playerid,HitmanZaun1Ids[14], HitmanZaun1[14][0], HitmanZaun1[14][1], HitmanZaun1[14][2], HitmanZaun1[0][3], HitmanZaun1[0][4], HitmanZaun1[14][5]);
ParkZaeune[15]=CreatePlayerObject (playerid,HitmanZaun1Ids[15], HitmanZaun1[15][0], HitmanZaun1[15][1], HitmanZaun1[15][2], HitmanZaun1[0][3], HitmanZaun1[0][4], HitmanZaun1[15][5]);
}
else if(listnumber==2)
{
listnumber=3;
DestroyPlayerObject(playerid,ParkZaeune[0]);
DestroyPlayerObject(playerid,ParkZaeune[1]);
DestroyPlayerObject(playerid,ParkZaeune[2]);
DestroyPlayerObject(playerid,ParkZaeune[3]);
DestroyPlayerObject(playerid,ParkZaeune[4]);
DestroyPlayerObject(playerid,ParkZaeune[5]);
DestroyPlayerObject(playerid,ParkZaeune[6]);
DestroyPlayerObject(playerid,ParkZaeune[7]);
DestroyPlayerObject(playerid,ParkZaeune[8]);
DestroyPlayerObject(playerid,ParkZaeune[9]);
DestroyPlayerObject(playerid,ParkZaeune[10]);
DestroyPlayerObject(playerid,ParkZaeune[11]);
DestroyPlayerObject(playerid,ParkZaeune[12]);
DestroyPlayerObject(playerid,ParkZaeune[13]);
DestroyPlayerObject(playerid,ParkZaeune[14]);
DestroyPlayerObject(playerid,ParkZaeune[15]);
}
}
Jetz sollen die Objekte erscheinen wennman Num6 drückt und wenn man nochmal Num6 drückt sollen sie wieder verschwinden...
der teil mit dem verschwinden klappt aber noch nicht so ganz
ich hoffe jemand hat mein Problem verstanden und kann mir helfen.
MfG Leonidas