08.05.2010, 00:18
I'm using "SetPlayerPos(playerid, x,y,z-1);" right now when the player types /prone he will be teleported underground, but the problem is, I want him to be stuck in the ground and he is teleported through. Is there someway I can create an object that'll keep him in place underground just being able to shoot?
Код:
#include <a_samp> #include "gl_common" #define TEXT_WHITE 0xffffffff #define TEXT_YELLOW 0xffff00ff //------------------------------------------------ public OnFilterScriptInit() { print("Prone Script Loaded."); return 1; } //------------------------------------------------ public OnPlayerCommandText(playerid, cmdtext[]) { new idx; new cmd[256]; cmd = strtok(cmdtext, idx); if(!strcmp(cmdtext, "/prone", true)) { new Float:x,Float:y,Float:z; SendClientMessage(playerid, TEXT_WHITE, "You have gone prone."); SetPlayerPos(playerid, x,y,z-1); } return 0; }