24.09.2014, 02:16
Buenas, queria saber si alguien tiene alguna pagina y/o recurso para convertir comandos ZCMD/DCMD a STRCMP, Gracias!
CMD:tucomando(playerid, params[])
if(!strcmp(cmdtext,"tucomando",true))
CMD:c(playerid, params[]){
if(strcmp(cmdtext, "/c", true) == 0)
Para cambiar de ZCMD a strcmp es fбcil, simplemente le cambias el
pawn Код:
pawn Код:
|
if(!strcmp(cmdtext,"/tucomando",true))
CMD:c(playerid, params[]){
new string[170];
new cargos[MAX_PLAYER_NAME];
new cargos2[MAX_PLAYER_NAME];
if(!IsACop(playerid) || Info[playerid][pDutyPolicia] != 1) return SendClientMessage(playerid, COLOR_GRAD2, "Nesecitas colocarte el uniforme.");
if(!sscanf(params,"ii", params[0], params[1]))
{
GetPlayerName(params[0], cargos, sizeof(cargos));
GetPlayerName(playerid, cargos2, sizeof(cargos2));
switch(params[1])
{
case 0:
{
Info[params[0]][pWantedLevel] = 0;
SetPlayerWantedLevel(params[0], 0);
for(new i = 0; i < GetMaxPlayers(); i++)
if(IsACop(playerid))
SetPlayerColor(params[0], c0_color);
format(string, sizeof(string), "[Radio de policнa] {FFFFFF}Oficial %s dice: {00D2CF}%s {FFFFFF}tiene todo en orden, lo dejo continuar {F6FF00}(0)*", cargos2, cargos);
SendRadioMessage(1, TEAM_BLUE_COLOR, string);
PlayerPlaySound(params[0], 1084, 0.0, 0.0 , 10.0);
}
case 1:
{
format(string, sizeof(string), "{F6FF00}La policнa desea hablar contigo, si intentas escapar, serбs arrestado.");
SendClientMessageEx(params[0], COLOR_WHITE, string);
Info[params[0]][pWantedLevel] = 1;
SetPlayerWantedLevel(params[0], 1);
for(new i = 0; i < GetMaxPlayers(); i++)
if(IsACop(playerid))
SetPlayerColor(params[0], c1_color);
format(string, sizeof(string), "[Radio de policнa] {FFFFFF}Oficial %s dice: {00D2CF}%s {FFFFFF}parece sospechoso, voy a interrogarlo {F6FF00}(1)*", cargos2, cargos);
SendRadioMessage(1, TEAM_BLUE_COLOR, string);
PlayerPlaySound(params[0], 1084, 0.0, 0.0 , 10.0);
}
case 2:
{
format(string, sizeof(string), "Te escapaste, ahora toda la policia te buscarб.");
SendClientMessageEx(params[0], COLOR_WHITE, string);
Info[params[0]][pWantedLevel] = 2;
SetPlayerWantedLevel(params[0], 2);
for(new i = 0; i < GetMaxPlayers(); i++)
if(IsACop(playerid))
SetPlayerColor(params[0], c2_color);
format(string, sizeof(string), "[Radio de policнa] {FFFFFF}Oficial %s dice: {00D2CF}%s {FFFFFF}se resistiу al arresto, procedemos a persecuciуn {F6FF00}(2)*", cargos2, cargos);
SendRadioMessage(1, TEAM_BLUE_COLOR, string);
PlayerPlaySound(params[0], 1084, 0.0, 0.0 , 10.0);
}
case 3:
{
Info[params[0]][pWantedLevel] = 3;
SetPlayerWantedLevel(params[0], 3);
for(new i = 0; i < GetMaxPlayers(); i++)
if(IsACop(playerid))
SetPlayerColor(params[0], c3_color);
format(string, sizeof(string), "[Radio de policнa] {FFFFFF}Oficial %s dice: {00D2CF}%s {FFFFFF}se encuentra armado, procedan con precauciуn {F6FF00}(3)*", cargos2, cargos);
SendRadioMessage(1, TEAM_BLUE_COLOR, string);
PlayerPlaySound(params[0], 1084, 0.0, 0.0 , 10.0);
}
case 4:
{
Info[params[0]][pWantedLevel] = 4;
SetPlayerWantedLevel(params[0], 4);
for(new i = 0; i < GetMaxPlayers(); i++)
if(IsACop(playerid))
SetPlayerColor(params[0], c4_color);
format(string, sizeof(string), "[Radio de policнa] {FFFFFF}Oficial %s dice: {00D2CF}%s {FFFFFF}abriу fuego, necesito refuerzos {F6FF00}(4)*", cargos2, cargos);
SendRadioMessage(1, TEAM_BLUE_COLOR, string);
PlayerPlaySound(params[0], 1084, 0.0, 0.0 , 10.0);
}
case 5:
{
Info[params[0]][pWantedLevel] = 5;
SetPlayerWantedLevel(params[0], 5);
for(new i = 0; i < GetMaxPlayers(); i++)
if(IsACop(playerid))
SetPlayerColor(params[0], c5_color);
format(string, sizeof(string), "[Radio de policнa] {FFFFFF}Oficial %s dice: {00D2CF}%s {FFFFFF}asesinу, detener vivo o muerto {F6FF00}(5)*", cargos2, cargos);
SendRadioMessage(1, TEAM_BLUE_COLOR, string);
PlayerPlaySound(params[0], 1084, 0.0, 0.0 , 10.0);
}
case 6:
{
Info[params[0]][pWantedLevel] = 6;
SetPlayerWantedLevel(params[0], 6);
for(new i = 0; i < GetMaxPlayers(); i++)
if(IsACop(playerid))
SetPlayerColor(params[0], c6_color);
format(string, sizeof(string), "[Radio de policнa] {FFFFFF}Oficial %s dice: {00D2CF}%s {FFFFFF}es extremadamente peligroso, disparen a matar {F6FF00}(6)*", cargos2, cargos);
SendRadioMessage(1, TEAM_BLUE_COLOR, string);
PlayerPlaySound(params[0], 1084, 0.0, 0.0 , 10.0);
}
}
}
else SendClientMessage(playerid, -1, "Utiliza: /c [id] [0-6]");
return 1;
}
forward Policia(member, color, string[]);
public Policia(member, color, string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsACop(i))
{
SendClientMessage(i, color, string);
}
}
}
}