This Command is not working
#1

Код:
if(!strcmp(cmdtext, "/sate", true))
    {
        if(PlayerInfo[playerid][pMember] != 2 && !IsAnAgent(playerid))
	   	{
    		SendClientMessage(playerid, COLOR_GREY, "   You are not a member of the FBI !");
	      	return 1;
		}
		if(UsingSate[playerid] == 1)
		{
		    SetCameraBehindPlayer(playerid);
		    PutPlayerInVehicle(playerid, gLastCar[playerid], 2);
			TogglePlayerControllable(playerid, 1);
		    UsingSate[playerid] = 0;
			oldsposx[playerid] = 0.0; oldsposy[playerid] = 0.0; oldsposz[playerid] = 0.0;
			newsposx[playerid] = 0.0; newsposy[playerid] = 0.0; newsposz[playerid] = 0.0;
			ZOOM[playerid] = 0;
			SetCameraBehindPlayer(playerid);
			return 1;
		}
		if(IsPlayerInAnyVehicle(playerid))
  		{
  			new playervehid = GetPlayerVehicleID(playerid);
	 		new playervehmodel = GetVehicleModel(playervehid);
			if(playervehmodel != 482)
			{
				SendClientMessage(playerid, COLOR_GREY, "   You are not in a burrito !");
				return 1;
			}
			if(GetPlayerVehicleSeat(playerid) == 2 || GetPlayerVehicleSeat(playerid) == 3)
			{
				if(UsingSate[playerid] == 0)
				{
				    SetPlayerFacingAngle(playerid, 0.0);
					GetPlayerPos(playerid, oldsposx[playerid], oldsposy[playerid], oldsposz[playerid]);
					SetPlayerPos(playerid, oldsposx[playerid], oldsposy[playerid], oldsposz[playerid]+500);
					gLastCar[playerid] = playervehid;
					TogglePlayerControllable(playerid, 0);
					GetPlayerPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid]);
					SetPlayerCameraPos(playerid, newsposx[playerid], newsposy[playerid], newsposz[playerid]+200);
					SendClientMessage(playerid, COLOR_GREY, "   Use up, down, left, right to navigate and fire key to adjust the zoom !");
					SetPlayerCameraLookAt(playerid, newsposx[playerid], newsposy[playerid]+5, newsposz[playerid]);
				    UsingSate[playerid] = 1;
				    ZOOM[playerid] = 1;
				    return 1;
				}
			}
		}
                SendClientMessage(playerid, COLOR_GREY, "   You are not in a burrito !");
		return 1;
    }
Reply
#2

Debug's?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)