/blindfold - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /blindfold (
/showthread.php?tid=32856)
Re: /blindfold -
Cueball - 08.04.2008
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):
with this:
pawn Код:
new id = GetPlayerId(tmp);
Thanks for the feedback on my descriptions.
~Cueball~
Re: /blindfold -
Saorp - 08.04.2008
Thanks alot, it works great
Re: /blindfold -
kavkazian - 09.04.2008
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...
Re: /blindfold -
Pujan2008 - 09.04.2008
so can anyone pastebin the FULL script
Re: /blindfold -
Pghpunkid - 10.04.2008
Im not sure if i missed in previously but, why not just use a TextDraw table for the full screen with 0% transparency?
Re: /blindfold -
kavkazian - 10.04.2008
show us the Exampel of your Script with TextDrwa...
Re: /blindfold -
yom - 10.04.2008
As i said you could just look in my FS to see how i did - it's very easy anyway...
Re: /blindfold -
kavkazian - 10.04.2008
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?
Re: /blindfold -
Cactus - 10.04.2008
Duuur put a text draw over it, no?
Re: /blindfold -
yom - 10.04.2008
Using a totally opaque textdraw, the only thing the player can see is the chat
Re: /blindfold -
Joe Staff - 10.04.2008
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)
Re: /blindfold -
yom - 10.04.2008
Sure they don't go over
Re: /blindfold -
Joe Staff - 10.04.2008
Weaksauce, they didn't go over for me
Re: /blindfold -
kavkazian - 10.04.2008
this is the fade...!
and when you change interior you have some problems...betther to use text draw!
Re: /blindfold -
Qeux - 11.04.2009
to make the screen black you can use seifader a new include from Seif
Re: /blindfold -
MenaceX^ - 11.04.2009
Are you posting here? Look the date, April 2008.