SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 25 of 69
Search took 0.01 seconds.
Search: Posts Made By: Sacky
Forum: Includes 05/06/2007, 12:46 PM
Replies: 47
Views: 17,984
Posted By Sacky
Re: [INC]SInterior 2.0

New Version 2.0 available here:

http://www.pastebin.ca/539978
Forum: Includes 05/06/2007, 12:22 PM
Replies: 47
Views: 17,984
Posted By Sacky
Re: [INC]SInterior 1.1

I'll get to work on a SA:MP 0.2 compatible version of it
Forum: Scripting Help 02/06/2007, 01:53 AM
Replies: 304
Views: 321,623
Posted By Sacky
Re: General Reference

The Exact Hex Colour used in Admin Announcements/Failed Team Private Messages/Unknown Command:

#define COLOUR_ADMIN 0x2587CEAA
#define COLOUR_FAILED_TEAM_MSG 0xDC181AFF
#define COLOUR_UNK_CMD...
Forum: Filterscripts 28/05/2007, 12:19 PM
Replies: 97
Views: 21,534
Posted By Sacky
Re: [FS] xAntiSwear - Replace swear words with ****

VarCheck(text[],word[])
{
new tmptxt[64];
for(new i=0,j=strlen(text);i<j;i++)
{
switch(text[i])
{
case 'a'..'z': tmptxt[strlen(tmptxt)] = text[i];
case 'A'..'Z':...
Forum: Filterscripts 28/05/2007, 08:12 AM
Replies: 97
Views: 21,534
Posted By Sacky
Re: [FS] xAntiSwear - Replace swear words with ****

Indeed SLF (http://forum.sa-mp.com/index.php?topic=8053.msg55776#msg55776) was the first script i ever saw that managed to edit players text, and also the first idea ive seen of this
Forum: Scripting Help 25/05/2007, 08:54 AM
Replies: 304
Views: 321,623
Posted By Sacky
Re: General Reference

It's better just to customly change the MAX_PLAYERS define to your maximum number of players, GetMaxPlayers() is a native and is less efficient than a simple macro, then again so processing 50 extra...
Forum: Filterscripts 18/05/2007, 08:07 AM
Replies: 1,162
Sticky: Useful Snippets
Views: 557,975
Posted By Sacky
Re: Useful Snippets

Your absolutely right! I'm sorry i was so blind about that, well thats one hurdle crossed thanks to Simon :)
Forum: Filterscripts 18/05/2007, 07:33 AM
Replies: 1,162
Sticky: Useful Snippets
Views: 557,975
Posted By Sacky
Re: Useful Snippets

Using that throws a ton of errors my way :|

new bool:t = true;
If t == true Then
Dim Test As Integer
Test = 3;
Else
// Do Something else
End If
Forum: Filterscripts 18/05/2007, 06:26 AM
Replies: 1,162
Sticky: Useful Snippets
Views: 557,975
Posted By Sacky
Re: Useful Snippets

A taste of modifying Pawn to be more like VB, for the VB programmers out there who find it hard to adjust:

Using defines we can change the way if() works

#define If if(
#define Then ){...
Forum: Scripting Help 11/05/2007, 06:21 AM
Replies: 304
Views: 321,623
Posted By Sacky
Re: General Reference

Some undocumented native functions:

native settime(hour=cellmin, minute=cellmin, second=cellmin);
native setdate(year=cellmin, month=cellmin, day=cellmin);
native settimer(milliseconds, bool:...
Forum: Filterscripts 15/04/2007, 12:57 PM
Replies: 1,162
Sticky: Useful Snippets
Views: 557,975
Posted By Sacky
Re: Useful Snippets

Corrected, thanks for noticing
Forum: Filterscripts 13/04/2007, 08:31 AM
Replies: 1,162
Sticky: Useful Snippets
Views: 557,975
Posted By Sacky
Re: Useful Snippets

Automatic 1337 speak:

Global Declarations:

new bool:leet[MAX_PLAYERS];

OnPlayerConnect:

public OnPlayerConnect(playerid){
leet[playerid] = false;
Forum: Scripting Help 30/03/2007, 10:19 PM
Replies: 304
Views: 321,623
Posted By Sacky
Re: General Reference

A list of radar icons, there id's, what they are and there pictures (for 0.2 radar functions)

http://www.lzfdownloads.de/index2.php?page=46&action=text
Forum: Filterscripts 06/03/2007, 10:47 AM
Replies: 1,162
Sticky: Useful Snippets
Views: 557,975
Posted By Sacky
Re: Useful Snippets

Blinking Radar Player Icons

This is just a simple script but can be very useful for "highlighting" a player, for instance with a bounty of more than 500,000

Global Variables:

new...
Forum: Gamemode Scripts 27/02/2007, 07:07 AM
Replies: 878
Views: 193,521
Posted By Sacky
Re: [Gamemode] Grand Theft Online (freeroam, level, xp, races, gangs, more)

to fix the bug use draco's latest dutils (at least thats what solved it on my test server), unfortunately it didnt work for my other server!
Forum: Filterscripts 16/02/2007, 04:57 AM
Replies: 1,162
Sticky: Useful Snippets
Views: 557,975
Posted By Sacky
Re: Useful Snippets

Well i learnt this trick from PhyscoGod, it involves chucking your own code into native functions, something that GetPlayerSkin could use

for example:

Instead of:

stock...
Forum: Gamemode Scripts 12/02/2007, 02:50 AM
Replies: 878
Views: 193,521
Posted By Sacky
Re: [Gamemode] Grand Theft Online (freeroam, level, xp, races, gangs, more)

Does anyone know what causes it though? I have been having the same problems with one of my scripts and i can't pinpoint it, all of a sudden the script dies and doesn't take callbacks from the server
Forum: Filterscripts 12/02/2007, 02:43 AM
Replies: 1,162
Sticky: Useful Snippets
Views: 557,975
Posted By Sacky
Re: Useful Snippets

Pixels IsPlayerDisconnected won't work, you always need to return a value, like this would be a working version:

IsPlayerDisconnected(playerid){
if(IsPlayerConnected(playerid)) return false;...
Forum: Filterscripts 07/02/2007, 09:18 AM
Replies: 1,162
Sticky: Useful Snippets
Views: 557,975
Posted By Sacky
Re: Useful Snippets

Words(string[]){
new idx,words;
while(strlen(strtok(string,idx))) words++;
return words;
}

public OnPlayerCommandText(playerid,cmdtext[]){
for(new i=0,j=Words(cmdtext),idx;i<j;i++){...
Forum: Filterscripts 05/02/2007, 07:45 AM
Replies: 1,162
Sticky: Useful Snippets
Views: 557,975
Posted By Sacky
Re: Useful Snippets

Well...

IsPlayerSpawned is in this very topic
GetPlayerInteriorID and IsPlayerInAnyInterior are S:Interior functions

and the whole point of the code is to give you the callbacks for...
Forum: Filterscripts 05/02/2007, 03:34 AM
Replies: 1,001
Views: 274,665
Posted By Sacky
Re: Useful Commands

how about this:

dini_spam(playerid,params[]){
if(!IsPlayerAdmin(playerid)){
SendClientMessage(playerid,COLOR_RED,"You don't have permission to use this command");
return true;
}
new...
Forum: Filterscripts 03/02/2007, 04:43 AM
Replies: 1,162
Sticky: Useful Snippets
Views: 557,975
Posted By Sacky
Re: Useful Snippets

OnPlayerEnterInterior and OnPlayerLeaveInterior

new plastint[MAX_PLAYERS];

public InteriorTimer(){
for(new i=0;i<MAX_PLAYERS;i++){
if(IsPlayerConnected(i)){
if(IsPlayerSpawned(i)){...
Forum: Filterscripts 02/02/2007, 11:52 AM
Replies: 1,162
Sticky: Useful Snippets
Views: 557,975
Posted By Sacky
Re: Useful Snippets

Thanks for that ******, clearly i thought it was something that it wasn't however still useful

and boylett could you not just check the state?

IsPlayerSpawned(playerid){
new statex =...
Forum: Filterscripts 02/02/2007, 05:02 AM
Replies: 1,162
Sticky: Useful Snippets
Views: 557,975
Posted By Sacky
Re: Useful Snippets

Could you give an example of how it could be used? For instance in a str2bin(string[])? I think this could be really useful
Forum: Filterscripts 28/01/2007, 01:18 PM
Replies: 1,162
Sticky: Useful Snippets
Views: 557,975
Posted By Sacky
Re: Useful Snippets

No I'm not assuming there consecutive, check my code again, i find the highest playerid according to OnPlayerConnect and make the max loop that, then when a player disconnects i reevaluate the...
Showing results 1 to 25 of 69

 

All times are GMT. The time now is 11:49 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.