Need Little Help Only!
#1

Hey all i made /mdm1 Command (MINIGUN DEATH MATCH)

But how do make leaveing command?

i have this code:

Код:
if(strcmp("/mdm1", cmdtext, true, 10) == 0)
	{
        if(InSpawn[playerid] == true) return SendClientMessage(playerid, COLOR_RED, "You can't use this command while on class selection");
      if(GetPVarInt(playerid, "InDm") == 1) return SendClientMessage(playerid,COLOR_RED, "You cant use any command While Your in DM");
      else
      {
		new pName[MAX_PLAYER_NAME];
        new string[128];
        GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
		format(string, sizeof(string), "{FFFFFF}[SERVER]:{FF002B}%s has teleported to {FFFFFF}Minigun Area - Xtreme Stunting Minigun Area (BETA) (/mdm1)",pName);
        SendClientMessageToAll(COLOR_RED, string);
		SendClientMessage(playerid, COLOR_GREEN,"Welcome To Minigun Area");
        GameTextForPlayer(playerid,"~w~Welcome To ~r~Minigun ~g~Area ~y~4",3000,3);
		if (IsPlayerInAnyVehicle(playerid)) {
            SetVehiclePos(GetPlayerVehicleID(playerid),2306.8291,1406.1932,42.4696);
            SetVehicleZAngle(GetPlayerVehicleID(playerid),268);
		} else {
            SetPlayerPos(playerid,200.0273,1388.7929,42.6139);
            SetPlayerFacingAngle(playerid,118);
            GivePlayerWeapon(playerid, 38, 99999999);
            PlayerPlaySound(playerid,1085,0.0,0.0,0.0);
            SetPlayerInterior(playerid,0);
		}
	  }
		return 1;
	}
Reply
#2

Please HELP ME SOMEONE!!!!!!!!!!!!!!!!!!!!!!!
Reply
#3

Wow. Just do the inverse to what you've done here.
Save the user's previous position like so:

pawn Код:
new Float:PrePos[MAX_PLAYERS][3];

GetPlayerPos(playerid, PrePos[playerid][0], PrePos[playerid][1], PrePos[playerid][2]);
And then afterwards, spawn him back without his minigun
pawn Код:
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid, PrePos[playerid][0], PrePos[playerid][1], PrePos[playerid][2]);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)