11.04.2012, 12:55
Hi everybody,
I made an human canon for my freeroam server and i don't know how to make the ejection.
The canon is vertical and I want the player to go on the sky.
My code :
but the player jump only 2 meters. If I do z*1000000 nothing happend.
Can you help me?
Thanks a lot!
I made an human canon for my freeroam server and i don't know how to make the ejection.
The canon is vertical and I want the player to go on the sky.
My code :
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
if(canon[playerid] == true)
{
Decompte = SetTimerEx("CountDown", 1000, true,"%d",playerid);
DisablePlayerCheckpoint(playerid);
}
return 1;
}
forward CountDown(playerid);
public CountDown(playerid)
{
new str[128], Float:x, Float:y, Float:z;
if(CountDownVar == 0)
{
KillTimer(Decompte);
CountDownVar = 5;
canon[playerid] = false;
GetPlayerVelocity(playerid,x,y,z);
SetPlayerVelocity(playerid,x,y,z+10000000);
}
else
{
CountDownVar--;
format(str, sizeof(str), "Lancement dans : %ds", CountDownVar);
GameTextForPlayer(playerid,str, 900, 0);
}
}
Can you help me?
Thanks a lot!