Help with command
#1

I want a command /startbattle . When i write this command, save my position. And when people write /joinbattle get him at my save coordonate. and give him knife.
Reply
#2

So, is startbattle is just for admin
Reply
#3

Код:
new,
BattleJoin = 999,
BattleX[MAX_PLAYERS],
BattleY[MAX_PLAYERS],
BattleZ[MAX_PLAYERS];

CMD:startbattle(playerid, params[])
{
BattleJoin = playerid;
new Float: x, Float: y, Float: z;
GetPlayerPos(playerid, x, y, z);
BattleX[playerid] = x;
BattleY[playerid] = y;
BattleZ[playerid] = z;
}

CMD:joinbattle(playerid, params[])
{
if(BattleJoin == 999) return 0;
new giveplayerid = BattleJoin;
SetPlayerPos(playerid, BattleX[giveplayerid], BattleY[giveplayerid], BattleZ[giveplayerid];
GivePlayerWeapon(playerid, 4, 99999);
}

Untested.
Reply
#4

Quote:
Originally Posted by Abagail
Посмотреть сообщение
Код:
new,
BattleJoin = 999,
BattleX[MAX_PLAYERS],
BattleY[MAX_PLAYERS],
BattleZ[MAX_PLAYERS];

CMD:startbattle(playerid, params[])
{
BattleJoin = playerid;
new Float: x, Float: y, Float: z;
GetPlayerPos(playerid, x, y, z);
BattleX[playerid] = x;
BattleY[playerid] = y;
BattleZ[playerid] = z;
}

CMD:joinbattle(playerid, params[])
{
if(BattleJoin == 999) return 0;
new giveplayerid = BattleJoin;
SetPlayerPos(playerid, BattleX[giveplayerid], BattleY[giveplayerid], BattleZ[giveplayerid];
GivePlayerWeapon(playerid, 4, 99999);
}

Untested.
i liked this one
Reply
#5

Ok i will test. I will be back with edit

EDIT: Don't work ... make in if(strcmp ... ) is easier for me with strcmp.
Reply
#6

Don't work ... make in if(strcmp ... ) is easier for me with strcmp.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)