[AJUDA]Comando
#1

Gente tou tentando coloca esse comando no meu gamemod, so que fika dando uns erro

if(strcmp("/comerpizza", cmdtext, true, 10) == 0){
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(dini_Int(file, "Pizzeiro") == 1){
dini_IntSet(file, "Pizzeiro", dini_Int(file, "Pizzeiro")+1);
SendClientMessage(playerid,C_TraficanteD,"{FFFF00}[INFO] {00FF00} Vocк estб Comendo Pizza");
dini_IntSet(file, "Pizzeiro", 1);
}else{
SendClientMessage(playerid,Vermelho,"Vocк nгo tem Pizza.");
}
return 1;
}

if(strcmp("/pegarpizza", cmdtext, true, 10) == 0)
{
new VehicleID;
VehicleID = GetPlayerVehicleID(playerid);
new modelo;
modelo = GetVehicleModel(VehicleID);
if(modelo == 44 {
new check;
check = CPS_GetPlayerCheckpoint(playerid);
if(check == checkcarga || check == checkcarga1 || check == checkcarga2 || check == checkcarga3 || check == checkcarga4 || check == checkcarga5){
new grana;
grana = GetPlayerGrana(playerid);
if(grana > 199){
if(check == checkdroga){
if(dini_Int(file, "Profissao") == Pizzeiro || IsPlayerAdmin(playerid)){
SendClientMessage(playerid,Pizzeiro,"{FFFF00}[INFO] {00FF00} Vocк pegou 20 Pizza.");
SendClientMessage(playerid,Pizzeiro,"e pagou 200 R$ por elas. /minhaspizza");
GivePlayerGrana(playerid, -200);
dini_IntSet(file, "Pizzeiro", dini_Int(file, "Maconha")+20);
dini_IntSet(file, "Pizzeiro", 1);
}else{
SendClientMessage(playerid,C_Pizzeiro,"{FFFF00}[INFO] {00FF00} Vocк nгo й Pizzeiro!");
}
}else{
SendClientMessage(playerid,C_Pizzeiro,"{FFFF00}[INFO] {00FF00} Vocк nгo estб na 'Pizzaria'!");
}
}else{
SendClientMessage(playerid,C_Pizzeiro,"{FFFF00}[INFO] {00FF00} Vocк nгo tem dinheiro suficiente! [200R$]!");
}
return 1;
}



if(strcmp(cmd, "/venderpizza", true) == 0) {
VehicleID = GetPlayerVehicleID(playerid);
new modelo;
modelo = GetVehicleModel(VehicleID);
if(modelo == 44 {
if(dini_Int(file, "Profissao") == Pizzeiro || dini_Int(file, "aAdmin") == 1 || IsPlayerAdmin(playerid)){
new tmp[256];
new plid;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, Vermelho, "Digite: /venderpizza [id]");
return 1;
}
plid = strval(tmp);
if(IsPlayerConnected(plid)){
new pname[MAX_PLAYER_NAME];
GetPlayerName(plid, pname, MAX_PLAYER_NAME);
format(file2, sizeof(file2), PASTA_CONTAS, pname);
if(dini_Int(file, "Pizzeiro") == 0){
SendClientMessage(playerid, Vermelho, "Sua Pizza acabou pegue mais na Pizzaria");
dini_IntSet(file2, "pizzeiro", 1);
return 1;
}
if(dini_Int(file, "Pizzeiro")>=1){
dini_IntSet(file, "Pizzeiro", dini_Int(file, "Pizzeiro")-1);
format(string, sizeof(string), "{FFFF00}[INFO] {00FF00} O Pizzeiro %s te ofereceu 1 Pizza", aname);
SendClientMessage(plid, C_Pizzeiro, string);
SendClientMessage(plid,C_Pizzeiro, "Vocк pode aceitar a Pizza ou recusar: /aceitar /recusar.");
SendClientMessage(playerid, Verde, "Pizza oferecido com sucesso!");
}
}else{
SendClientMessage(playerid, Vermelho, "ID invбlido");
}
return 1;
}
}



if(strcmp("/minhaspizza", cmdtext, true, 10) == 0){
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
if(dini_Int(file, "Profissao") == Pizzeiro || dini_Int(file, "aAdmin") == 1 || IsPlayerAdmin(playerid)){
SendClientMessage(playerid, verdel, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
format(string, sizeof(string), "Pizza: %d",dini_Int(file, "Pizzeiro"));
SendClientMessage(playerid, 0xFFFFFFAA, string);
SendClientMessage(playerid, verdel, "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
}
return 1;
}



Erros:

D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(1849) : error 004: function "CarregCar" is not implemented
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(2242) : error 017: undefined symbol "CPS_AddCheckpoint"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(2243) : error 017: undefined symbol "CPS_AddCheckpoint"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(2244) : error 017: undefined symbol "CPS_AddCheckpoint"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(2245) : error 017: undefined symbol "CPS_AddCheckpoint"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(2246) : error 017: undefined symbol "CPS_AddCheckpoint"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(2247) : error 017: undefined symbol "CPS_AddCheckpoint"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(224 : error 017: undefined symbol "CPS_AddCheckpoint"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(2251) : error 017: undefined symbol "CPS_AddCheckpoint"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(2252) : error 017: undefined symbol "CPS_AddCheckpoint"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(2253) : error 017: undefined symbol "CPS_AddCheckpoint"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(2254) : error 017: undefined symbol "CPS_AddCheckpoint"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(2255) : error 017: undefined symbol "CPS_AddCheckpoint"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(2256) : error 017: undefined symbol "CPS_AddCheckpoint"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(2257) : error 017: undefined symbol "CPS_AddCheckpoint"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(225 : error 017: undefined symbol "CPS_AddCheckpoint"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(2259) : error 017: undefined symbol "CPS_AddCheckpoint"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(2260) : error 017: undefined symbol "CPS_AddCheckpoint"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(2261) : error 017: undefined symbol "CPS_AddCheckpoint"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(2262) : error 017: undefined symbol "CPS_AddCheckpoint"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(2263) : error 017: undefined symbol "CPS_AddCheckpoint"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(2264) : error 017: undefined symbol "CPS_AddCheckpoint"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(2265) : error 017: undefined symbol "CPS_AddCheckpoint"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(2266) : error 017: undefined symbol "CPS_AddCheckpoint"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(2271) : error 017: undefined symbol "CPS_AddCheckpoint"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(2272) : error 017: undefined symbol "CPS_AddCheckpoint"

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


26 Errors.


Alguem pode Mi Ajuda
Reply
#2

Baixe a include cpstream.inc
Reply
#3

ainda deu o msm erro
Reply
#4

colocou isso no topo do gm
pawn Код:
#include <cpstream>
Reply
#5

D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(29) : warning 201: redefinition of constant/macro (symbol "MAX_CHECKPOINTS")
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(400) : warning 201: redefinition of constant/macro (symbol "cpinfo")
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(401) : error 021: symbol already defined: "cpX"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(407) : error 021: symbol already defined: "CPSERVICE_active"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(40 : error 021: symbol already defined: "Checkpoints"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(409) : error 021: symbol already defined: "UsedCPSlot"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(410) : error 021: symbol already defined: "CPSERVICE_actualcp"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(1849) : error 004: function "CarregCar" is not implemented
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(2612) : error 017: undefined symbol "ResetPlayerGrana"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(2644) : error 017: undefined symbol "PlayerName"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(2652) : error 017: undefined symbol "PlayerName"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(2775) : error 017: undefined symbol "function218"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(2832) : error 017: undefined symbol "GetPlayerGrana"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(285 : error 017: undefined symbol "GetName"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(2864) : error 017: undefined symbol "GetName"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(2897) : error 004: function "Logarprof" is not implemented
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(3025) : error 017: undefined symbol "PlayerName"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(3036) : error 017: undefined symbol "PlayerName"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(3071) : error 017: undefined symbol "GetName"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(3073) : error 017: undefined symbol "GetName"
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(3145) : error 079: inconsistent return types (array & non-array)
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(3150) : error 079: inconsistent return types (array & non-array)
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(3165) : error 079: inconsistent return types (array & non-array)
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(3176) : error 079: inconsistent return types (array & non-array)
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(3184) : error 079: inconsistent return types (array & non-array)
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(3197) : error 079: inconsistent return types (array & non-array)
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(3206) : error 079: inconsistent return types (array & non-array)
D:\Documents\San Andreas - Multi Player\Brasil Vida Ladrгo - Meu Servidor\Server Samp\gamemodes\dynamic.pwn(3227) : error 079: inconsistent return types (array & non-array)

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


26 Errors.

agora da esses erro...
Reply
#6

Coloca o cуdigo entre as tags [pawn*] [/pawn*] Retire os asteriscos.
Reply
#7

Editado =)
Reply
#8

@Shutdown98

A diferenзa й que no segundo ele vai checar atй o dйcimo caractere. No primeiro ele checa o comprimento mбximo do segundo elemento, no caso cmdtext.

strlen procura por um caractere especial chamado EOS(End o' String) ou /0. Ele indica o fim de uma array do tipo string e й colocada automaticamente pelas outras funзхes tipo format, etc.
Se vocк for fazer um manipulador manual, lembre-se de terminar a string com um caractere a mais \0.

Mais basicamente, se eu faзo strlen("olб"). Ele vai retornar 3.
!strlen(tmp) verifica se tmp estб vazia (0).
Reply
#9

Resposta =

Falta chaves..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)