29.03.2010, 13:43
How can i do when a player stands on an object (or a platform), this object will go up just like a lift?
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;
}
}
if(!strcmp("/activate",cmdtext))
{
if(IsPlayerInRangeOfPoint(playerid,1, 1006.2309,1027.5194,48.1328))
{
PlayerPlaySound(playerid, 1020, 0.0, 0.0, 0.0);
SendClientMessage(playerid,0x33AA33AA,"Platform will start moving in a few seconds");
MoveObject(obj,994.28308105469, 1051.5045166016, 48.0, 15.00);
}
else
{
MoveObject(obj,994.28308105469, 1051.5045166016, 357.8299, 15.00);
}
return 1;
}
return 0;
}
MoveObject(obj,994.28308105469, 1051.5045166016, 357.8299, 15.00);
}
else
{
MoveObject(obj,994.28308105469, 1051.5045166016, 48.0, 15.00);