22.02.2012, 16:53
I will teach guys how to count the objects we have in our server.
-First we create a variable that stores the number of objects
-Then we will call a function to move the objects to be counted CreateObject before
-Now create the function
-Now we can see in a Dialogue
End xD.
-First we create a variable that stores the number of objects
pawn Код:
new OBJECT;
pawn Код:
forward ObjectCount(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DRAW_DISTANCE);
pawn Код:
public ObjectCount(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DRAW_DISTANCE)
{
OBJETC++;
return CreateObject(modelid, X, Y, Z, rX, rY, rZ, DRAW_DISTANCE);
}
pawn Код:
new str[3];
format(str, sizeof(3), "%i", OBJECT);
ShowPlayerDialog(playerid, ID, DIALOG_STYLE_MSGBOX, "Object", str, "Ok", " ");