Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- new WalkWater[MAX_PLAYERS];
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (!strcmp(cmdtext, "/walkwater", true))
- {
- WalkWater[playerid] = CreateObject(8661, 0.000000, 0.000000, 0.000000, 178.400314,0.000000,0.000000);
- return 1;
- }
- return 0;
- }
- public OnPlayerUpdate(playerid)
- {
- new Float:Pos[3];
- GetObjectPos(WalkWater[playerid], Pos[0], Pos[1], Pos[2]);
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- if(Pos[2] < 0.0)
- {
- SetObjectPos(WalkWater[playerid], Pos[0], Pos[1], 0.0);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment