irgendwie plaziert er keine Pflanze warum?
if(strcmp(cmdtext,"/pflanzen", true) == 0){PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);new Float:plocx,Float:plocy,Float:plocz,Float:ploca;GetPlayerPos(playerid, plocx, plocy, plocz);GetPlayerFacingAngle(playerid,ploca);CreateSpice(792,plocx,plocy,plocz+0.6,ploca);GameTextForPlayer(playerid,"~w~Spice ~g~plaziert",3000,1);return 1;}if(strcmp(cmdtext,"/pflanzeweg", true) == 0){DeleteClosestSpice(playerid);GameTextForPlayer(playerid,"~w~Spice ~r~verbrannt!",3000,1);}
und definiert sind die hier :
stock CreateSpice(Object,Float:x,Float:y,Float:z,Float:Angle){for(new i = 0; i < sizeof(Spices); i++){if(Spices[i][sCreated] == 0){Spices[i][sCreated] = 1;Spices[i][sX] = x;Spices[i][sY] = y;Spices[i][sZ] = z-0.7;Spices[i][sObject] = CreateObject(Object, x, y, z-0.9, 0, 0, Angle);return 1;}}return 0;}stock DeleteClosestSpice(playerid){for(new i = 0; i < sizeof(Spices); i++){if(IsPlayerInRangeOfPoint(playerid, 5.0, Spices[i][sX], Spices[i][sY], Spices[i][sZ])){if(Spices[i][sCreated] == 1){Spices[i][sCreated] = 0;Spices[i][sX] = 0.0;Spices[i][sY] = 0.0;Spices[i][sZ] = 0.0;DestroyObject(Spices[i][sObject]);return 1;}}}return 0;}
//EDIT : Doch hat sich geklärt die werden plaziert