Give player jetpack.
#1

I am looking for a way to give player a jetpack. This is old way I used:
pawn Код:
if (!strcmp("/jet", cmdtext, true))
    {
        new Float:x, Float:y, Float:z;
        GetPlayerPos(playerid, x, y, z);
        CreatePickup(370, 4, x, y, z);
        return 1;
    }
But in my new GM this command doesnt work. I think it is because there players play on a map which is located far away from SA map, in the sea. I am looking for any other ways to give player jetpack. I hope yopu can help. Thank you in advance.
Reply
#2

Hello i'm use a gamemode and there is a cmd..
i think you can use it..
Код:
CMD:jetpack(playerid, params[])
{
    if(PlayerInfo[playerid][World] == TDMWorldID) return SendClientMessage(playerid, COLOR_RED, "you can't use this command in this world");
	if(PlayerInfo[playerid][World] == DMWorldID) return SendClientMessage(playerid, COLOR_RED, "ERROR: you may not use this command in the Deathmatch World!");
    if(PlayerInfo[playerid][AdminLevel] < 3) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
    SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
	if(sscanf(params, "u", playerid)) return SendClientMessage(playerid, COLOR_GREY, "you can also use: /jetpack [playerid]");
    SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
    return 1;
}
CMD:jp(playerid, params[])
{
	return cmd_jetpack(playerid, params);
}
Note: its not made by me. But i have allowed to give this.
Reply
#3

Код:
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);
Edit: Lol too late
Reply
#4

pawn Код:
if (!strcmp("/jet", cmdtext, true))
    {
        SetPlayerSpecialAction(playerid, 2);
        return 1;
    }
TADA u now have a jetpack
Reply
#5

I never knew it is so easy,lol, thank you guys xD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)