28.12.2010, 17:03
Introduзгo
☻ Esse script foi feito pelos pedidos que o drakon criou ne um topic la e fui la e fiz ne !☻ Ele e bem simples vocК adiciona cameras de seguranзa usando AddCamera
Como Usar
♥ AddCamera e usado da seguinte forma:
pawn Код:
// Nome X Y Z Angle
AddCamera("Los Santos", 1209.8090,-1751.8210,13.5937,2125.52);
@Creditos: HigorOliver
@Pastebiba: http://pastebin.com/eAFcyiGm
Coder :
pawn Код:
//==============================================================================
#include <a_samp>
#define FILTERSCRIPT // Define que e filter Script (:
#define MAX_CAM 500 // Maximo de Cameras
#define Gay "Drakon" // Define que todo gay se resume ao drakon
//==============================================================================
new
Total=-1;
enum
Cams
{
CameraN[100],
Float:Cod1,
Float:Cod2,
Float:Cod3,
Float:Angulo,
ID
};
new
Camera[MAX_CAM][Cams];
//==============================================================================
public
OnFilterScriptInit()
{
print("\n--------------------------------------");
print("Sistema de Camera By: Higor (:");
print("--------------------------------------\n");
AddCamera("Los Santos", 1209.8090,-1751.8210,13.5937,2125.52);
return true;
}
//==============================================================================
stock
AddCamera(nomete[], Float:codd1, Float:codd2, Float:codd3,Float:angle1)
{
Total++;
format(Camera[Total][CameraN],100,"%s",nomete);
Camera[Total][Cod1] = codd1;
Camera[Total][Cod2] = codd2;
Camera[Total][Cod3] = codd3;
Camera[Total][Angulo] = angle1;
Camera[Total][ID] = Total;
printf("ID: %d Camera: %s ",Total,Camera[Total][CameraN]);
return true;
}
//==============================================================================
public
OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new string[128];
if(listitem == Camera[listitem][ID])
{
if(!response) return false;
format(string, sizeof(string), "Camera -> %s", Camera[listitem][CameraN]);
SendClientMessage(playerid, 0xFFFFFFFF, string);
SetPlayerCameraPos(playerid,Camera[listitem][Cod1],Camera[listitem][Cod2],Camera[listitem][Cod3]);
SetPlayerFacingAngle(playerid,Camera[listitem][Angulo]);
return true;
}
return false;
}
//==============================================================================
public
OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/cameras", true)) {
new dados[1050];
format(dados, 1050, "");
for(new i=0;i<=Total;i++) {
format(dados,1050, "%s%s\n",dados,Camera[i][CameraN]);
}
ShowPlayerDialog(playerid,251,DIALOG_STYLE_LIST, "Cameras",dados,"Ver", "Sair");
}
return false;
}