08.03.2014, 21:19
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.
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.
Код:
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. |