05.02.2010, 17:42
I'm requesting help in scripting walkie talkie, with such commands like /setfreq etc.
new Float:pFrequency[MAX_PLAYERS];
public OnPlayerCommandText(playerid,cmdtext[])
{
if(!strcmp(cmdtext[1],"setfreq",true,7))
{
new tmp[64];
format(tmp,32,"%.01f",floatstr(cmdtext[9]));
pFrequency[playerid]=floatstr(tmp);
format(tmp,64,"Your ferquency is now %s",tmp);
return 1;
}
if(!strcmp(cmdtext[1],"w",true,1))
{
if(pFrequency[playerid]==0)return SendClientMessage(playerid,0xFF0000FF,"Use /SetFreq <Frequency> first!");
new tmp[150];
GetPlayerName(playerid,tmp,24);
format(tmp,150,"*[%.01F]%s: %s",pFrequency[playerid],tmp,cmdtext[3]);
for(new ply;ply<MAX_PLAYERS;ply++)
{
if(pFrequency[playerid]==pFrequency[ply])SendClientMessage(ply,0xEE3333FF,tmp);
}
return 1;
}
return 0;
}
Originally Posted by Joe Staff
Ok, despite the fact you should have place this in the Script Request Thread. I'm going to make it.
pawn Код:
|
Originally Posted by Oggle McFoggle
Sorry but there is only one command /setfrequency but I'll need the whole system like /wt [text]
|
Originally Posted by CalgonX
Steal all of my ideas from my server...
![]() |
Originally Posted by Daniel_June
Quote:
|
Originally Posted by CalgonX
Steal all of my ideas from my server...
![]() |