21.08.2010, 15:28
Bom galera ja procurei e nгo consigo achar o comando de /procurar que fica seguindo se alguem poder passa ficarei feliz
if(strcmp(cmd, "/find", true) == 0) { if(IsPlayerConnected(playerid)) { if(pDados[playerid][pJob] != 1) { SendClientMessage(playerid, COLOR_GREY, " You are not a Detective !"); return 1; } if(UsedFind[playerid] != 0 && pDados[playerid][pDetSkill] < 401) { SendClientMessage(playerid, COLOR_GREY, " You've already searched for someone, wait 2 minutes !"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /find [playerid/PartOfName]"); return 1; } giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot Find yourself!"); return 1; } new points; new level = pDados[playerid][pDetSkill]; if(level >= 0 && level <= 50) { points = 4; } else if(level >= 51 && level <= 100) { points = 6; } else if(level >= 101 && level <= 200) { points = 8; } else if(level >= 201 && level <= 400) { points = 10; } else if(level >= 401) { points = 12; } GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); new Float:X,Float:Y,Float:Z; GetPlayerPos(giveplayerid, X,Y,Z); SetPlayerCheckpoint(playerid, X,Y,Z, 6); FindTime[playerid] = 1; FindTimePoints[playerid] = points; pDados[playerid][pDetSkill] ++; UsedFind[playerid] = 1; if(pDados[playerid][pDetSkill] == 50) { SendClientMessage(playerid, COLOR_YELLOW, "* Your Detective Skill is now Level 2, soon you are able to find Faction Members."); } else if(pDados[playerid][pDetSkill] == 100) { SendClientMessage(playerid, COLOR_YELLOW, "* Your Detective Skill is now Level 3, soon you are able to find Faction Members."); } else if(pDados[playerid][pDetSkill] == 200) { SendClientMessage(playerid, COLOR_YELLOW, "* Your Detective Skill is now Level 4, you are now able to find Faction Members."); } else if(pDados[playerid][pDetSkill] == 400) { SendClientMessage(playerid, COLOR_YELLOW, "* Your Detective Skill is now Level 5, you are now able to find Faction Members."); } } } else { SendClientMessage(playerid, COLOR_GREY, " Invalid Name/ID !"); } } return 1; }
if(strcmp(cmd, "/satelite", true) == 0)
{
tmp = strtok(cmdtext, idx);//Define o que for digitado depois de /satelite;
if(!strlen(tmp))//Se nada for digitado depois;
{
SendClientMessage(playerid, COLOR_GRAD2, "USO: /satelite [playerid/parte do nome]");
return 1;
}
giveplayerid = ReturnUser(tmp);//Retorna um usuбrio (Й preciso ter #include <utils> em seu gm/fs!);
GetPlayerName(giveplayerid, sendername, sizeof(sendername));//Coleta o nome dessa pessoa;
format(string, sizeof(string), "ATENЗГO: %s - pessoa ENCONTRADA no satйlite. A pessoa foi marcada no GPS.", sendername);//Mostra uma mensagem bonitinha;
SetPlayerMarkerForPlayer(playerid, giveplayerid, 0xFF0000FF);//Vocк DEVE ter ShowPlayerMarkers(1); em seu OnGameModeInit.
//Se vocк tem um servidor de RP, ou nгo quer que apareзa todos os jogadores no mapa, digite em OnPlayerConnect:
//SetPlayerColor(playerid, 0xFFFFFF00);
SendClientMessage(playerid, 0xFFFFFFFF, string);
return 1;
}