01.04.2010, 16:37
// somewhere top of script
new obj;
// under OnGameModeInIt
obj = CreateObject(3115, 994.28308105469, 1051.5045166016, 48.017349243164, 0, 0, 0);
CreateObject(16093, 1006.2313232422, 1025.3850097656, 47, 0, 0, 0);
// under OnPlayerCommandText
if(!strcmp("/t",cmdtext))
{
if(IsPlayerInRangeOfPoint(playerid, 5.0,1006.2313232422, 1025.3850097656, 47))
MoveObject(obj,994.28308105469, 1051.5045166016, 48.017349243164,15.0);
}
else
{
MoveObject(obj,978.1339,2299.8567,49.3317,5);
return 1;
}
return 0;
}
I get no errors, but when i go in the place where i want to type /t, the object doesn't move...
new obj;
// under OnGameModeInIt
obj = CreateObject(3115, 994.28308105469, 1051.5045166016, 48.017349243164, 0, 0, 0);
CreateObject(16093, 1006.2313232422, 1025.3850097656, 47, 0, 0, 0);
// under OnPlayerCommandText
if(!strcmp("/t",cmdtext))
{
if(IsPlayerInRangeOfPoint(playerid, 5.0,1006.2313232422, 1025.3850097656, 47))
MoveObject(obj,994.28308105469, 1051.5045166016, 48.017349243164,15.0);
}
else
{
MoveObject(obj,978.1339,2299.8567,49.3317,5);
return 1;
}
return 0;
}
I get no errors, but when i go in the place where i want to type /t, the object doesn't move...