[DUVIDA]Erro nas Chaves (URGENTE!) -
rene20 - 25.09.2010
Код:
//---------------------------<[ OnPlayerCommandText ]>--------------------------------------------------------
public OnPlayerCommandText(playerid, cmdtext[])
{
new string[256];
new playerdinheiro;
new giveplayer[MAX_PLAYER_NAME];
new playername[MAX_PLAYER_NAME];
new cmd[256];
new tmp[256];
new giveplayerid, moneys, idx;
cmd = strtok(cmdtext, idx);
/* CREEEEEEEEEEEEEEEEEEEEEUUUUUUUUUUUUUUUUUU */
if(strcmp(cmd, "/creu", true) == 0 || strcmp(cmd, "/crйu", true) == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s estб danзando o Crйu.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ApplyAnimation(playerid,"CHOPPA","CHOPPA_back",4.1,1,1,1,1,1);
SendClientMessage(playerid, COLOR_DBLUE, "ЙЙЙЙ Creeeeeeu!");
return 1;
}
if(strcmp(cmd, "/cvip", true) == 0 || strcmp(cmd, "/chatvip", true) == 0)
{
if(IsPlayerConnected(playerid) && PlayerInfo[playerid][pVIP] >= 1)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USO: /cvip [Chat Vip]");
return 1;
}
format(string, sizeof(string), "** VIP %s: %s", sendername, result);
SendVIPMessage(0xFFCCFFAA,string);
printf("VIP %s: %s", sendername, result);
}
return 1;
}
if (strcmp(cmd, "/infodacasa", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (gPlayerLogged[playerid] != 0)
{
InfoDaCasa();
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s olha as info da casa.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Voce nao esta logado !");
}
}
return 1;
}
if(!strcmp(cmdtext, "/cinto", true))
{
if(IsPlayerInAnyVehicle(playerid))
{
if(CintoPlayer[playerid] == 1)
{
CintoPlayer[playerid] = 1;
SendClientMessage(playerid,VERDE,"[AVISO]: Parabйns Vocк esta de Cinto, Agora Esta Protegido (/tirarcinto)");
SetPlayerWantedLevel(playerid, 0);
}else{
SendClientMessage(playerid,VERDE,"[AVISO]: Vocк nгo esta a um Carro");
}
}else{
SendClientMessage(playerid,VERDE,"[AVISO]: Vocк Jб Esta comCinto");
}
return 1;
}
if(!strcmp(cmdtext, "/tirarcinto", true))
{
if(IsPlayerInAnyVehicle(playerid))
{
if(CintoPlayer[playerid] == 0)
{
CintoPlayer[playerid] = 0;
SendClientMessage(playerid,AMARELO,"[AVISO]: Cuidado Vocк Esta Sem Cinto, Pode Morrer (/cinto)");
SetPlayerWantedLevel(playerid, 0);
}else{
SendClientMessage(playerid,VERDE,"[AVISO]: Vocк nгo esta a um Carro");
}
}else{
SendClientMessage(playerid,VERDE,"[AVISO]: Vocк Jб Esta sem Cinto");
}
return 1;
}
return 0;
}
Respuesta: [DUVIDA]Erro nas Chaves (URGENTE!) -
Ivan_xD - 25.09.2010
pawn Код:
//---------------------------<[ OnPlayerCommandText ]>--------------------------------------------------------
public OnPlayerCommandText(playerid, cmdtext[])
{
new string[256];
new playerdinheiro;
new giveplayer[MAX_PLAYER_NAME];
new playername[MAX_PLAYER_NAME];
new cmd[256];
new tmp[256];
new giveplayerid, moneys, idx;
cmd = strtok(cmdtext, idx);
/* CREEEEEEEEEEEEEEEEEEEEEUUUUUUUUUUUUUUUUUU */
if(strcmp(cmd, "/creu", true) == 0 || strcmp(cmd, "/crйu", true) == 0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s estб danзando o Crйu.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ApplyAnimation(playerid,"CHOPPA","CHOPPA_back",4.1,1,1,1,1,1);
SendClientMessage(playerid, COLOR_DBLUE, "ЙЙЙЙ Creeeeeeu!");
return 1;
}
if(strcmp(cmd, "/cvip", true) == 0 || strcmp(cmd, "/chatvip", true) == 0)
{
if(IsPlayerConnected(playerid) && PlayerInfo[playerid][pVIP] >= 1)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USO: /cvip [Chat Vip]");
return 1;
}
format(string, sizeof(string), "** VIP %s: %s", sendername, result);
SendVIPMessage(0xFFCCFFAA,string);
printf("VIP %s: %s", sendername, result);
}
return 1;
}
if (strcmp(cmd, "/infodacasa", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (gPlayerLogged[playerid] != 0)
{
InfoDaCasa();
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s olha as info da casa.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Voce nao esta logado !");
}
}
return 1;
}
if(!strcmp(cmdtext, "/cinto", true))
{
if(IsPlayerInAnyVehicle(playerid))
{
if(CintoPlayer[playerid] == 1)
{
CintoPlayer[playerid] = 1;
SendClientMessage(playerid,VERDE,"[AVISO]: Parabйns Vocк esta de Cinto, Agora Esta Protegido (/tirarcinto)");
SetPlayerWantedLevel(playerid, 0);
}else{
SendClientMessage(playerid,VERDE,"[AVISO]: Vocк nгo esta a um Carro");
}
}
else
{
SendClientMessage(playerid,VERDE,"[AVISO]: Vocк Jб Esta comCinto");
}
return 1;
}
if(!strcmp(cmdtext, "/tirarcinto", true))
{
if(IsPlayerInAnyVehicle(playerid))
{
if(CintoPlayer[playerid] == 0)
{
CintoPlayer[playerid] = 0;
SendClientMessage(playerid,AMARELO,"[AVISO]: Cuidado Vocк Esta Sem Cinto, Pode Morrer (/cinto)");
SetPlayerWantedLevel(playerid, 0);
}else{
SendClientMessage(playerid,VERDE,"[AVISO]: Vocк nгo esta a um Carro");
}
}else{
SendClientMessage(playerid,VERDE,"[AVISO]: Vocк Jб Esta sem Cinto");
}
return 1;
}
return 0;
}
eu postei a msm coisa no seu outro topico manolo
Este foro requiere que tъ esperes 120 segundos entre mensajes. Por favor intenta de nuevo en 33 segundos.