Guest User

Untitled

a guest
Apr 9th, 2013
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. if(strcmp(cmd, "/otvori", true) == 0 || strcmp(cmd, "/gateopen", true) == 0) // sama komanda
  2. { //ode ti se otvara sljedeca komanda
  3. if (PlayerToPoint(15, playerid,1589.053344,-1638.123168,14.122960)) //ovo ti provjerava dali je igrac u okoloni te pozicije
  4. {
  5. MoveDynamicObject(pdgate1,1599.053344,-1638.123168,14.122960, 0.8);
  6. SetTimer("GateClose", 12000, 0);
  7. SendClientMessage(playerid, COLOR_BLUE,"Garaza je otvorena i zatvorice se za 7 sekundi.");
  8. return 1;
  9. }
  10.  
  11. to ti ide di su komande u tvom gm-u
  12.  
  13. sad ides napravit ovo
  14. ides napravit forward to ti je na vrhu gm-a
  15.  
  16. forward GateClose(playerid);
  17. i new
  18. new pdgate1; //mos stavit upisto pdgate1 sta hoces al miras i gore u komandi prominit move dynamic object pdgate1 u to sta stavis pod new
  19.  
  20. pa ovo dodajes
  21.  
  22.  
  23. public GateClose(playerid)
  24. {
  25. MoveDynamicObject(pdgate1,1589.053344,-1638.123168,14.122960, 0.97); //pozicija di dolazi vrata kad se zatvvore
  26. PlayerPlaySound(playerid, 1153, 1589.053344,-1638.123168,14.122960); //i zvuk koji se cuje mos ga i maknit ako os
  27. return 1;
  28. }
  29. pdgate1 = CreateDynamicObject(971,1589.053344,-1638.123168,14.122960,0.000000,0.000000,180);
Advertisement
Add Comment
Please, Sign In to add comment