Need help with command
#1

Hey guys.

I don't understand why this is happening but.....

This is the code

PHP Code:
CMD:flipcoin(playeridparams[]) // or CMD:mycommand(playerid, params[])
{
  new 
string[128];
  new 
rc random(sizeof(Coinside));
  new 
pname[24];
  
GetPlayerName(playeridpname24);
  if(
LoggedIn[playerid] == 0) return SendClientMessage(playeridERROR_COLOR"[ *** ERROR *** ] You cannot use commands because you are not logged in.");
  if(
IsDead[playerid] == 1) return SendClientMessage(playeridERROR_COLOR"[ *** ERROR *** ] You cannot use commands because you are dead.");
  {
    
format(stringsizeof(string), "%s Flips a coin into the air and the coin lands on %s",pnameCoinside[rc]);
     
ProxDetector(15.0playeridstring, -1);
  }
  return 
1;

What happens is that whenever i type in the command nothing happens. I checked my ProxDetector, I verified this script 1,000 times.

Basically what is suppose to happen is you flip a coin it grabs Heads or Tales as a random value and displays it to players within 15 meters.

Get back to me if u guys have an idea.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)