Estou iniciar pwn duvidas -
ouioui - 01.02.2013
Boas pessoal eu sou novo nisto de pwn nunca fiz algo do gйnero, comecei agora a criar um GM(com base noutro) para ir percebendo algumas coisas jб li vбrios tutoriais nгo quero ser apressado nгo estou a criar para abrir qualquer tipo de server por agora sу mesmo para eu conseguir perceber o que й pwn e tirar esta confusгo de achar o pwn um bicho de 7 cabeзas pois quero conhecer e saber mexer nele.
1Є Questгo
O que й isto ?
Код:
//============[SYSTEM RELATED MESSAGE DEFINES]========
#define BUSINESS_TYPES "1: Restaurante - 2: Companhia Telefonica - 3: Loja 24-7 - 4: Ammunation - 5: Advertising - 6: Loja de Roupa - 7: Bar/Club - 8: Farmacia"
#define BUSINESS_TYPES2 "9: Stand de Carros - 10: Casa de Emprestimos - 11: Entretenimento - 12: Quinta"
//====================================================
#include <a_samp>
#include <core>
#include <float>
#include <time>
#include <file>
#include <Dini>
#include <a_players>
#include <streamer>
#include <JunkBuster>
#include <KveH>
//====================================================
#define MAX_STRING 255
#define COLOR_PURPLE 0xC2A2DAAA
#define COLOR_LIGHTRED 0xFF6347AA
#define COLOR_GRAD2 0xBFC0C2FF
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_ORANGE 0xFF9900AA
Sei que a primeira parte й para definir os idґs das business certo ? se tiver errado digam, mas o resto
Код:
#include <a_samp>
#include <core>
#include <float>
#include <time>
#include <file>
#include <Dini>
#include <a_players>
#include <streamer>
#include <JunkBuster>
#include <KveH>
//====================================================
#define MAX_STRING 255
#define COLOR_PURPLE 0xC2A2DAAA
#define COLOR_LIGHTRED 0xFF6347AA
#define COLOR_GRAD2 0xBFC0C2FF
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_ORANGE 0xFF9900AA
E o que queria saber mesmo era isto ----
Код:
#define MAX_STRING 255
E o resto tambйm expliquem por favor isto
Re: Estou iniciar pwn duvidas -
Falcon. - 01.02.2013
pawn Код:
#define BUSINESS_TYPES "1: Restaurante - 2: Companhia Telefonica - 3: Loja 24-7 - 4: Ammunation - 5: Advertising - 6: Loja de Roupa - 7: Bar/Club - 8: Farmacia"
#define BUSINESS_TYPES2 "9: Stand de Carros - 10: Casa de Emprestimos - 11: Entretenimento - 12: Quinta"
aqui estб somente definindo BUSINESS_TYPES como um texto... assim vocк pode usar:
SendClientMessage(playerid, color, BUSINESS_TYPES);
em seu modo padrгo seria:
SendClientMessage(playerid, color, "1: Restaurante - 2: Companhia Telefonica...");
pawn Код:
#include <a_samp>
#include <core>
#include <float>
#include <time>
#include <file>
#include <Dini>
#include <a_players>
#include <streamer>
#include <JunkBuster>
#include <KveH>
aqui estб somente incluindo arquivos externos ao seu script. Й uma forma de melhor organizaзгo do cуdigo.
#include a_samp, й sempre necessбria para criar seus script para sa-mp.
pawn Код:
#define MAX_STRING 255
#define COLOR_PURPLE 0xC2A2DAAA
#define COLOR_LIGHTRED 0xFF6347AA
#define COLOR_GRAD2 0xBFC0C2FF
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_ORANGE 0xFF9900AA
#define MAX_STRING 255 define 'max_string' como o valor 255, entгo quando for criar uma array:
new something[MAX_STRING];
sem o define:
new something[255];
#define COLOR_PURPLE 0xC2A2DAAA
#define COLOR_LIGHTRED 0xFF6347AA
#define COLOR_GRAD2 0xBFC0C2FF
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_ORANGE 0xFF9900AA
define cores para ser usada em SendClientMessage, jб que quase ninguйm consegue decorar todas as cores hex.
SendClientMessage(playerid, COLOR_ORANGE, "hello world");
Re: Estou iniciar pwn duvidas -
ouioui - 01.02.2013
#define MAX_STRING 255 define 'max_string' como o valor 255, entгo quando for criar uma array:
pode explicar por alto o que й um array ?
Re: Estou iniciar pwn duvidas -
Falcon. - 01.02.2013
um tutorial explicando sobre variбveis e arrays:
https://sampforum.blast.hk/showthread.php?tid=344000
nгo sou muito bem explicando... acima tem alguns exemplos de oque й, como funciona, como manipular.