Guest User

Untitled

a guest
Dec 3rd, 2014
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. #include <a_samp>
  2. new WalkWater[MAX_PLAYERS];
  3. public OnPlayerCommandText(playerid, cmdtext[])
  4. {
  5. if (!strcmp(cmdtext, "/walkwater", true))
  6. {
  7. WalkWater[playerid] = CreateObject(8661, 0.000000, 0.000000, 0.000000, 178.400314,0.000000,0.000000);
  8. return 1;
  9. }
  10. return 0;
  11. }
  12.  
  13. public OnPlayerUpdate(playerid)
  14. {
  15. new Float:Pos[3];
  16. GetObjectPos(WalkWater[playerid], Pos[0], Pos[1], Pos[2]);
  17. GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
  18. if(Pos[2] < 0.0)
  19. {
  20. SetObjectPos(WalkWater[playerid], Pos[0], Pos[1], 0.0);
  21. }
  22. return 1;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment