SA-MP Forums Archive
[Ajuda] Identaзгo de um codigo - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Identaзгo de um codigo (/showthread.php?tid=359907)



Identaзгo de um codigo - Bruno Alves - 15.07.2012

Esse codigo с ta bem identado me ajudem tipo, vc coloca favela vc й teleportado atй la mais aparece o nome de outro player on.Lembrando q esse tele й para o carrro tbm

pawn Код:
if(strcmp(cmd, "/favela", true) == 0) {
   if(IsPlayerInAnyVehicle(playerid)) {
   new VehicleID;
   VehicleID = GetPlayerVehicleID(playerid);
   SetVehiclePos(VehicleID,2229.4368,-1138.4003,25.3521);
   SetVehicleZAngle(GetPlayerVehicleID(playerid), 1.1080);
   GetPlayerName(playerid, pname, sizeof (pname));
   format(string, sizeof(string), "%s para a favela: {FFFF00}/FAVELA", pname);
   SendClientMessageToAll(0x00FF00FF, string);
   SetPlayerInterior(playerid,0);
   PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
 }
   else{
   GetPlayerName(playerid, pname, sizeof (pname));
   format(string, sizeof(string), "%s para a favela: {FFFF00}/FAVELA", pname);
   SendClientMessageToAll(0x00FFFFFF, string);
   SetPlayerInterior(playerid,0);
   SetPlayerPos(playerid,2229.4368,-1138.4003,25.3521);
   SetPlayerFacingAngle(playerid,190.9207);
   PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
   }
   return 1;
   }



Re: Identaзгo de um codigo - ViniBorn - 15.07.2012

pawn Код:
if(strcmp(cmd, "/favela", true) == 0)
{
    GetPlayerName(playerid, pname, sizeof (pname));
    format(string, sizeof(string), "%s foi para a favela: {FFFF00}/FAVELA", pname);
    SendClientMessageToAll(0x00FFFFFF, string);
    PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
    SetPlayerInterior(playerid,0);
    if(IsPlayerInAnyVehicle(playerid))
    {
        new VehicleID = GetPlayerVehicleID(playerid);
        SetVehiclePos(VehicleID,2229.4368,-1138.4003,25.3521);
        SetVehicleZAngle(GetPlayerVehicleID(playerid), 1.1080);
    }
    else
    {
        SetPlayerPos(playerid,2229.4368,-1138.4003,25.3521);
        SetPlayerFacingAngle(playerid,190.9207);
    }
    return true;
}



Re: Identaзгo de um codigo - .FuneraL. - 15.07.2012

pawn Код:
if(strcmp(cmd, "/favela", true) == 0)
{
   new pname[24];
   if(IsPlayerInAnyVehicle(playerid))
   {
        new VehicleID;
        VehicleID = GetPlayerVehicleID(playerid);
        SetVehiclePos(VehicleID,2229.4368,-1138.4003,25.3521);
        SetVehicleZAngle(GetPlayerVehicleID(playerid), 1.1080);
        GetPlayerName(playerid, pname, sizeof (pname));
        format(string, sizeof(string), "%s foi morar em San Fierro: {FFFF00}/SF", pname);
        SendClientMessageToAll(0x00FF00FF, string);
        SetPlayerInterior(playerid,0);
        PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
   }
   else
   {
        GetPlayerName(playerid, pname, sizeof (pname));
        format(string, sizeof(string), "%s para a favela: {FFFF00}/FAVELA", pname);
        SendClientMessageToAll(0x00FFFFFF, string);
        SetPlayerInterior(playerid,0);
        SetPlayerPos(playerid,2229.4368,-1138.4003,25.3521);
        SetPlayerFacingAngle(playerid,190.9207);
        PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
   }
   return 1;
}



Re: Identaзгo de um codigo - Crueliz0n - 15.07.2012

@edit

ja respoderam /\


Re: Identaзгo de um codigo - Bruno Alves - 15.07.2012

vlw ae galera