Simple /gate CMD - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Simple /gate CMD (
/showthread.php?tid=310460)
Simple /gate CMD -
-CaRRoT - 12.01.2012
Did that :
PHP код:
if(strcmp(cmdtext,"/ddgate", true) == 0)
{
MoveDynamicObject(DDEPOT,1895.0921630859, -1879.7592773438, 13.479251861572,2); //object(phils_compnd_gate) (2)
SendClientMessage(playerid, COLOR_YELLOW, "Drug Depot Gate has Been opened.");
return 1;
}
and it's not working - the Client Message works but the gate not working {Rep+ for Helping}
Re: Simple /gate CMD -
Konstantinos - 12.01.2012
pawn Код:
public OnGameModeInIt()
{
// 12 is random Object. What is the DDEPOT?
CreateObject(12, 1950.0921630859, -1879.7592773438, 13.479251861572, 0.0, 0.0, 96.0); // Make sure the X, Y, Z aren't the same.
return 1;
}
pawn Код:
if(strcmp("/ddgate", cmdtext, true, 7) == 0)
{
MoveDynamicObject(12, 1895.0921630859, -1879.7592773438, 13.479251861572, 2.0); // objectid
SendClientMessage(playerid, COLOR_YELLOW, "Drug Depot Gate has Been opened.");
return 1;
}
Re: Simple /gate CMD -
-CaRRoT - 12.01.2012
DDepot is the gate name that i already defined up :
PHP код:
DDEPOT = CreateDynamicObject(968, 1895.0921630859, -1879.7592773438, 13.479251861572, 0, 90, 0);
Re: Simple /gate CMD -
Konstantinos - 12.01.2012
The mistake is on Coordinates (X, Y, Z). Coordinates from CreateDynamicObject are same as MoveDynamicObject.
The objects can't move in the same position. Change it!
Re: Simple /gate CMD -
-CaRRoT - 12.01.2012
oh , my bad - didn't notice that , thanks

, repped