18.06.2009, 11:09
Main Code:
The variables playerX, playerY, and playerZ are picked up earlier. They are correct.
I have a problem with this code. Although it's not implemented yet, it should at least create an information icon at the spot where the player's standing. It doesn't. Everything else in the code works perfectly, as I've tested with the client callback. The only problem is that the icon doesn't appear. To clarify - this is a script for creating dynamic enter locations to various places (you know, in those servers that have you type '/enter' to enter a building etc.). This is just the first part of the script; I'm going to later add functions such as SaveEnters etc. Except the bladdy icons don't show up. Can anyone help?
Код:
new idCounter = 0; enum Enters { PICKUPID, Float:ENTERX, Float:ENTERY, Float:ENTERZ, UNIVERSEID, Float:INTX, Float:INTY, Float:INTZ, }; new EnterSigns[256][Enters]; NewEnter(playerid, Float:x, Float:y, Float:z, universeID, Float:newX, Float:newY, Float:newZ){ idCounter = 0; while(EnterSigns[idCounter][UNIVERSEID] != 0 && idCounter != 256){ idCounter++; } if(idCounter == 256){ SendClientMessage(playerid,COLOR_WHITE,"Maximum number of enter locations hit!"); } else{ new aString[128]; EnterSigns[idCounter][PICKUPID] = CreatePickup(19,1239,x,y,z); EnterSigns[idCounter][ENTERX] = x; EnterSigns[idCounter][ENTERY] = y; EnterSigns[idCounter][ENTERZ] = z; EnterSigns[idCounter][UNIVERSEID] = universeID; EnterSigns[idCounter][INTX] = newX; EnterSigns[idCounter][INTY] = newY; EnterSigns[idCounter][INTZ] = newZ; format(aString,sizeof(aString),"Enter point from %f, %f, %f to Universe %i: %f, %f, %f with ID %i.",EnterSigns[idCounter][ENTERX],EnterSigns[idCounter][ENTERY],EnterSigns[idCounter][ENTERZ],EnterSigns[idCounter][UNIVERSEID],EnterSigns[idCounter][INTX],EnterSigns[idCounter][INTY],EnterSigns[idCounter][INTZ],idCounter); SendClientMessage(playerid,COLOR_WHITE,aString); } }
I have a problem with this code. Although it's not implemented yet, it should at least create an information icon at the spot where the player's standing. It doesn't. Everything else in the code works perfectly, as I've tested with the client callback. The only problem is that the icon doesn't appear. To clarify - this is a script for creating dynamic enter locations to various places (you know, in those servers that have you type '/enter' to enter a building etc.). This is just the first part of the script; I'm going to later add functions such as SaveEnters etc. Except the bladdy icons don't show up. Can anyone help?