--> Help With a CMD <-- -
xSkullx - 14.08.2012
Hi everybody, i have that ironman cmd, but it doesn't fly

)
pawn Код:
on top:
new
bool:flying[MAX_PLAYERS],
Javelin[MAX_PLAYERS][2],
Float:JavPos[MAX_PLAYERS][3];
on player command text:
if(!strcmp(cmdtext, "/ironman", true))
{
if((flying[playerid] = !flying[playerid]))
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerHealth(playerid, 1000000000.0);
SetTimerEx("IronMan", 100, 0, "d", playerid);
SetTimerEx("DestroyMe", 500, 0, "d", CreateObject(2780, x, y, z - 3.0, 0.0, 0.0, 0.0));
ShowPlayerDialog(playerid,91,DIALOG_STYLE_MSGBOX,"{6EF83C}Ironman", "{FF00EA}Ironman: {6EF83C}ON \n{FFFFFF}Scrie {6EF83C}/ironman {FFFFFF}ca sa-l dezactivezi.", "Ok", "" );
}
else
SetPlayerHealth(playerid, 100.0);
return 1;
}
Re: --> Help With a CMD <-- -
Shetch - 14.08.2012
Код:
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y, z+10);
You won't fly, it will just put your player a couple meters higher.
You could also try creating a timer and checking if a key is pressed.
If a key is pressed add 1 to the z variable.
Re : --> Help With a CMD <-- -
Eony - 14.08.2012
Check the flymode.pwn filterscript included by default in the SA-MP 0.3e server, might help you
Re: --> Help With a CMD <-- -
xSkullx - 14.08.2012
What i have to do to make it to fly?
Re : Re: --> Help With a CMD <-- -
Eony - 14.08.2012
Quote:
Originally Posted by xSkullx
What i have to do to make it to fly?
|
Check this
flymode.pwn. Just copy everything where it belongs in your FS / GM. Or even better, simply use that FS.
Re: --> Help With a CMD <-- -
Shetch - 14.08.2012
Quote:
Originally Posted by xSkullx
What i have to do to make it to fly?
|
Yea, the flymode.pwn should work pretty well.
Re: --> Help With a CMD <-- -
xSkullx - 14.08.2012
Solved.
Thanks.