if(!strcmp("/Try", cmdtext, true, 4)) { if(cmdtext[4] == ' ') { new plyName[MAX_PLAYER_NAME]; new buffer[255]; new rand = random(20); GetPlayerName(playerid, plyName, MAX_PLAYER_NAME); strdel(cmdtext, 0, 4); if(rand >= 10) { format(buffer, sizeof(buffer), "* %s tries and succeeds in %s", plyName, cmdtext); }else{ format(buffer, sizeof(buffer), "* %s tries and fails in %s", plyName, cmdtext); } for(new ply; ply != MAX_PLAYERS; ply++) { if(CheckPlayerDistanceToPlayer(20, playerid, ply)) { SendClientMessage(ply, 0x00FFFF, buffer); } } }else{ SendClientMessage(playerid, 0xFF0000FF, "USA: /Try [action]"); } return 1; } |
Originally Posted by Command /Try
if(!strcmp("/intentar", cmdtext, true, 4))
{ if(cmdtext[4] == ' ') { new plyName[MAX_PLAYER_NAME]; new buffer[255]; new rand = random(20); GetPlayerName(playerid, plyName, MAX_PLAYER_NAME); strdel(cmdtext, 0, 4); if(rand >= 10) { format(buffer, sizeof(buffer), "* %s intenta %s y lo consigue", plyName, cmdtext); }else{ format(buffer, sizeof(buffer), "* %s intenta %s pero falla", plyName, cmdtext); } for(new ply; ply != MAX_PLAYERS; ply++) { { SendClientMessage(ply, 0x00FFFF, buffer); } } }else{ SendClientMessage(playerid, 0xFF0000FF, "USA: /intentar [accion]"); } return 1; } |