Anonymous
public text v1 · immutable/////////////DIVE2 WITH VARIABLE HEIGHT//////////////////
if(strcmp(cmd, "/dive2", true) == 0)
{
new tmp[256];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /dive2 [height]");
return 1;
}
else
{
GivePlayerWeapon(playerid,46,1);
new Float:x,Float:y,Float:z,Float:dif;
dif = strval(tmp);
GetPlayerPos(playerid,x,y,z);
SetPlayerPos(playerid,x,y,floatadd(z,dif));
}
return 1;
}