18.07.2009, 17:38
I had a working test script but went gone
Anyway I found an old copy of it which isn't working :
Anyway I found an old copy of it which isn't working :
pawn Код:
#include <a_samp>
#include <SRO>
new exist, obj, x, y, z;
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Soft Object Rotation, Test");
print("--------------------------------------\n");
exist = 0;
return 1;
}
public OnFilterScriptExit()
{
exist = 0;
return 1;
}
public OnObjectRotated(objectid)
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/make", cmdtext, true, 5) == 0)
{
if(exist == 0){
GetPlayerPos(playerid, x, y, z);
obj = CreateObject(987,x-2,y+2,z+3,0,0,0);
exist = 1;
}else{
SendClientMessage(playerid, 0xFF4411FF, "You must delete the test thing to create a new one!");
}
return 1;
}
if(strcmp("/del", cmdtext, true, 4) == 0)
{
if(exist == 1){
DestroyObject(obj);
exist = 0;
}else{
SendClientMessage(playerid, 0xFF4411FF, "There is nothing to delete!");
}
return 1;
}
if(strcmp("/rotx", cmdtext, true, 5) == 0)
{
if(exist == 1){
RotateObject(obj, 20, 0, 0, 2.0);
}else{
SendClientMessage(playerid, 0xFF4411FF, "There is nothing to rotate!");
}
return 1;
}
return 0;
}