02.04.2013, 11:05
Hi.I'm converting my gangwars mode command to zcmd.I wanna to convert this command now
pawn Код:
if (strcmp(cmd, "/radio", true) == 0)
{
if(PlayerInfo[playerid][Radio] == 1)
{
new radio[0x24];
radio = strtok(cmdtext, idx);
if(!strlen(radio))
{
SendClientMessage(playerid,COLOR_RED,"Radio: Test");
return 1;
}
if(strcmp(radio, "test", true) == 0)
{
PlayerInfo[playerid][pRadio] = 1;
SendClientMessage(playerid,COLOR_GREEN,"You start radio "test".");
SendClientMessage(playerid,COLOR_RED,"You can stop it with /radio off");
PlayAudioStreamForPlayer(playerid,"...");
}
if(strcmp(radio, "off", true) == 0)
{
PlayerInfo[playerid][pRadio] = 0;
SendClientMessage(playerid,COLOR_GREEN,"You stop radio.");
StopAudioStreamForPlayer(playerid);
}
}
else
{
SendClientMessage(playerid,COLOR_RED,"You didn't have radio!");
}
return 1;
}