27.10.2015, 03:14
Comando de revisar Inv:
Comando de Revisar:
Код:
if(strcmp(cmd, "/RevisarInv", true) == 0) //Inspecciona el inventario de un jugador { if(PlayerInfo[playerid][pAdmin] < 1){ SendClientMessage(playerid, Rojo, "* Nivel de admin insuficiente."); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, Naranja, "* /RevisarInv [ID]"); return 1; } playerid2 = ReturnUser(tmp); if(IsPlayerConnected(playerid2) && playerid2 != INVALID_PLAYER_ID) { format(string, sizeof(string), "Objetos de %s:", GetPlayerNameRP(playerid2)); SendClientMessage(playerid, Amarillo, string); format(string, sizeof(string), "Mano derecha: %s (Cant: %d)", ObjetoInfo[PlayerInfo[playerid2][pManoDer]][NombreObjeto], PlayerInfo[playerid2][pManoDerCant]); SendClientMessage(playerid, Blanco, string); format(string, sizeof(string), "Mano izquierda: %s (Cant: %d)", ObjetoInfo[PlayerInfo[playerid2][pManoIzq]][NombreObjeto], PlayerInfo[playerid2][pManoIzqCant]); SendClientMessage(playerid, Blanco, string); if(PlayerInfo[playerid2][pServicioPD] == 0) { for(new x=0; x<8; x++) { format(string, sizeof(string), "Bol #%d: %s (Cant: %d)", x+1, ObjetoInfo[PlayerInfo[playerid2][pBol][x]][NombreObjeto], PlayerInfo[playerid2][pBolCant][x]); SendClientMessage(playerid, Blanco, string); } } else { for(new x=0; x<8; x++) { format(string, sizeof(string), "Cint #%d: %s (Cant: %d)", x+1, ObjetoInfo[PlayerInfo[playerid2][pCint][x]][NombreObjeto], PlayerInfo[playerid2][pCintCant][x]); SendClientMessage(playerid, Blanco, string); } } } else { SendClientMessage(playerid,Rojo,"* ID invбlida."); } return 1; }
Код:
if(strcmp(cmd, "/Revisar", true) == 0) //Inspecciona los stats de un jugador { if(PlayerInfo[playerid][pAdmin] < 1){ SendClientMessage(playerid, Rojo, "* Nivel de admin insuficiente."); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, Naranja, "* /Revisar [ID]"); return 1; } playerid2 = ReturnUser(tmp); if(IsPlayerConnected(playerid2) && playerid2 != INVALID_PLAYER_ID) { ShowStats(AzulClaro, playerid, playerid2); } else { SendClientMessage(playerid,Rojo,"* ID invбlida."); } return 1; }