if(strcmp(cmd, "/buyc", true) == 0 || strcmp(cmd, "/buyclotes", true) == 0)
{
//=============================================================================================================================================================
// = Comanda: /r(adio)c(hannel)
//=============================================================================================================================================================
if (strcmp(cmd, "/rc", true) == 0 || strcmp(cmd, "/radiochannel", true) == 0)
{
if(IsPlayerInAnyVehicle(playerid) == 1 && GetPlayerVehicleSeat(playerid) == 0)
{
tmp = strtok(cmdtext, idx);
if(strlen(tmp) == 0) return SendClientMessage(playerid, COLOR_WHITE, "» Scrie: /r(adio)c(hannel) on / off");
//=============================================================================================================================================================
// = Comanda: /r(adio)c(hannel) off
//=============================================================================================================================================================
else if(strcmp(tmp, "off", true) == 0)
{
vehid = GetPlayerVehicleID(playerid);
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerInVehicle(i, vehid))
{
StopAudioStreamForPlayer(i);
}
}
return 1;
}
//=============================================================================================================================================================
// = Comanda: /r(adio)c(hannel) on
//=============================================================================================================================================================
else if(strcmp(tmp, "on", true) == 0)
{
ShowPlayerDialog(playerid, 9998, DIALOG_STYLE_LIST, "GameFront Radio System", "{ffd700}Radio: {ffffff}Dance\n{ffd700}Radio: {ffffff}Manele\n{ffd700}Radio: {ffffff}Populara\n{ffd700}Radio: {ffffff}DubSTEP\n{ffd700}Radio: {ffffff}House\n{ffd700}Radio: {ffffff}Hip-Hop\n{ffd700}Radio: {ffffff}RadioZU\n{ffd700}Radio: {ff0000}OFFLINE", "Ok", "");
return 1;
}
SendClientMessage(playerid, COLOR_WHITE, "» Scrie: /r(adio)c(hannel) on / off");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "{30a030}[GameFront]: {ffffff}Ne pare rau, dar trebuie sa te afli intr-un Vehicul pentru a utiliza aceasta comanda.");
return 1;
}
}
if(strcmp(cmd, "/buyc", true) == 0 || strcmp(cmd, "/buyclotes", true) == 0)
{
I know that , but if command is
pawn Код:
|
public OnPlayerCommandText( playerid, cmdtext[ ] )
{
dcmd( buyc, 4, cmdtext );
dcmd( buyclotes, 9, cmdtext );
return 0;
}
dcmd_buyc( playerid, params[ ] )
{
// code for command /buyc
return 1;
}
dcmd_buyclotes( playerid, params[ ] )
{
// code for command /buyclotes
return 1;
}
Why didnt scroll down to see it !
pawn Код:
|
I know that .... i want to know if i can do to that in same command , not make it 20 times ....
|
public OnPlayerCommandText( playerid, cmdtext[ ] )
{
dcmd( buyc, 4, cmdtext );
dcmd( buyclotes, 9, cmdtext );
return 0;
}
CMD:buyc(playrid,params[])
{
// you code here
return 1;
}