/blindfold
#21

pawn Код:
stock isNumeric(const string[])
{
  new length=strlen(string);
  if (length==0) return false;
  for (new i = 0; i < length; i++)
  {
    if (
      (string[i] > '9' || string[i] < '0' && string[i]!='-' && string[i]!='+') // Not a number,'+' or '-'
      || (string[i]=='-' && i!=0)                       // A '-' but not at first.
      || (string[i]=='+' && i!=0)                       // A '+' but not at first.
    ) return false;
  }
  if (length==1 && (string[0]=='-' || string[0]=='+')) return false;
  return true;
}

stock GetPlayerId(string[])
{ // By Alex (touched up by DracoBlue & Cueball)
  if(isNumeric(string))
  {
    new player = strval(string);
    if(IsPlayerConnected(player)) return player;
  }
  else
  {
    new playername[MAX_PLAYER_NAME];
    for(new i=0; i<=MAX_PLAYERS; i++)
    {
      if(IsPlayerConnected(i))
      {
        GetPlayerName(i, playername, MAX_PLAYER_NAME);
        if(strfind(playername, string, true) != -1) return i;
      }
    }
  }
  return INVALID_PLAYER_ID;
}
Copy these into your script (outside of any callbacks/functions, place it at the bottom).

Taken from dutils.inc by DracoBlue But it seems that I made a mistake, the function name is 'GetPlayerId(string[])' (note the Id, as opposed to ID).

Replace this line (in both commands):
pawn Код:
new id = strval(tmp);
with this:
pawn Код:
new id = GetPlayerId(tmp);
Thanks for the feedback on my descriptions.

~Cueball~
Reply
#22

Thanks alot, it works great
Reply
#23

its not so hard to make something like this command!
but the problem is...We can make the black screen! and this is GOOD RP!
but how we can disbale the map?
for noobs!?
we need to disbale the map...radar...
Reply
#24

so can anyone pastebin the FULL script
Reply
#25

Im not sure if i missed in previously but, why not just use a TextDraw table for the full screen with 0% transparency?
Reply
#26

show us the Exampel of your Script with TextDrwa...
Reply
#27

As i said you could just look in my FS to see how i did - it's very easy anyway...
Reply
#28

listen i just closed eyes!
and nth mounth too...
if i will use text player cant see the chat
maybe some command that can close the map radar?
Reply
#29

Duuur put a text draw over it, no?
Reply
#30

Using a totally opaque textdraw, the only thing the player can see is the chat
Reply
#31

Text draws don't go over radar or health, what you could do is just set the player's interior to 1 (or different of what the interior they're currently in)
Reply
#32

Sure they don't go over
Reply
#33

Weaksauce, they didn't go over for me
Reply
#34

this is the fade...!
and when you change interior you have some problems...betther to use text draw!
Reply
#35

to make the screen black you can use seifader a new include from Seif
Reply
#36

Are you posting here? Look the date, April 2008.
Reply


Forum Jump:


Users browsing this thread: 20 Guest(s)