SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 06/05/2014, 03:21 AM   #311
Meyokie
Banned
 
Join Date: Apr 2014
Posts: 67
Reputation: 12
Default Re: General Reference

List Of Heavens And Interiors:

Heaven 1 (Liberty Heaven):
Ammunation V2
Burglary House X3
Cafe
Caligulas Casino
Denise's Sex Place
Jet
Liberty City
Sweet's House
San Fierro Garage
Sindacco Abatoir
Sub Urban
Transfenders
Trials Stadium
Warehouse 2
Welcome Pump, The
Wu Zi Mu's

Heaven 2 (B Dups Crack Heaven):
Angel Pine Trailer
B Dups Crack Palace
Big Smoke's Crack Palace
Burglary House X2
Burglary House X9
Burglary House X10
Katie's Sex Place
Loco Low Co.
Pig Pen, The
Reece's Barbershop
Ryder's House

Heaven 3 (Ho Heaven):
B Dups Apartment
Bike School
Big Spread Ranch, The
Brothel
Brothel 2
Budget Inn Motel Room
Burglary House X1
Gay Gordo's Barbershop
Helena's Sex Place
Inside Track Betting
Jizzy's Pleasure Domes
LV Tattoo Parlour
LVPD HQ
OG Locs House
Pro-Laps
Planning Department
Record Label Hallway
Sex Shop
Wheel Arch Angels

Heaven 4 (Thief Heaven):
24/7 (V5)
Ammu-Nation (Palamino)
Burglary House X12
Burglary House X13
Burglary House X15
Diner 2
Dirtbike Stadium
Michelle's Sex Place

Heaven 5 (Gym Heaven):
Barbara's Sex Place
Burglary House X11
Burglary House X16
Burglary House X17
Crack Den
Diner
Ganton Gym
Madd Dogg's Mansion
Pizza Stack
Victim

Heaven 6 (RC Heaven)(Why?):
LSPD HQ
Marital Arts Gym
Millie's Bedroom

Heaven 7 (Ammunation Heaven):
8-Track Stadium
Ammu-Nation (2 Floors)
Burglary House X4
Below the Belt Gym

Heaven 8 (Burning Heaven):
Burning Desire House

Heaven 9 (Cluckin Heaven):
None.. I Can Imagine Clucking Bell Should Be Here...

Heaven 10 (Burgershot Heaven):
24/7 (V2)
Abandoned AC Tower
Burgershot
Burglary House X14
Four Dragons, The
SFPD HQ

Heaven 11 (Misty Heaven):
None.. Mistys Bar Maybe...

Heaven 12 (Macisla Heaven):
Budget Inn Motel Room
Casino
Macisla's Barbershop
Unused LS Safehouse

Heaven 13 (Normal World / Regular Heaven)
None... Its Normal World

Heaven 14 (Wardrobe Heaven):
Didier Sachs
Francis Int. (Front ext.)
Francis Int. (Baggage Claim/Ticket Sales)
Kickstart Stadium
Wardrobe

Heaven 15 (Binco Heaven):
Binco
Blood Bowl Stadium
Burglary House X5
Burglary House X6
Burglary House X7
Burglary House X8

Heaven 16 (LS Tattoo Heaven):
24/7 (V4)
LS Tattoo Parlour

Heaven 17 (Rusty Heaven):
24/7 (V1)
Club
Rusty Brown's
SF Hidden Tattoo Parlour

Heaven 18 (Zip Heaven):
24/7 (V3)
Atrium
Lil Probe Inn (Not Documented)
Warehouse
Zip
Meyokie is offline   Reply With Quote
Old 17/05/2014, 03:39 PM   #312
d3ll
Big Clucker
 
Join Date: May 2014
Location: England
Posts: 92
Reputation: 17
Default Re: General Reference

Create a /me with one line.

Code:
stock Action(playerid, txt[], Float:distance = 15.0) // Default distance.
{
	new Float:iX, Float:iY, Float:iZ, pname[MAX_PLAYER_NAME], code[128];
	GetPlayerPos(playerid,iX, iY, iZ);
	GetPlayerName(playerid, pname, sizeof(pname));
	for(new p = 0; p < MAX_PLAYERS; p++)
	{
		if(!IsPlayerInRangeOfPoint(p, distance, iX, iY, iZ)) continue;
		if(GetPlayerVirtualWorld(p) != GetPlayerVirtualWorld(playerid) || GetPlayerInterior(p) != GetPlayerInterior(playerid)) continue;
		format(code, sizeof(code), "** %s %s", pname, txt);
		SendClientMessage(p,0xC3A3DBAA, code);
	}
}

Just a basic function, not sure if I should put here - but here!!

Example of use:

Code:
COMMAND:me(playerid, params[])
{
	new iAction[128];
	if(sscanf(params, "s", iAction)) return SendClientMessage(playerid, -1, "[Action]");
	Action(playerid, iAction, 20.0);
	return 1;
}
__________________
Hi, if your reading this I love you.

Last edited by d3ll; 19/06/2014 at 12:00 PM.
d3ll is offline   Reply With Quote
Old 21/04/2015, 10:26 PM   #313
Kar
High-roller
 
Kar's Avatar
 
Join Date: May 2010
Location: Black Asylum
Posts: 3,131
Reputation: 450
Default Re: General Reference

Detecting gamemode restart.

If you already have an rconfix filterscript, use that or otherwise create a new filterscript.

Code:
#include <a_samp>

new gamemodeStartCount = 0;

public OnGameModeInit()
{
    if(gamemodeStartCount++ > 0) {
    	// GMX! Use CallRemoteFunction now to tell your gamemode something!
    }
    return 1;
}

I personally use

Code:
//filterscript
public OnGameModeInit()
{
    static gamemodeStartCount;
    if(gamemodeStartCount > 0) {
    	CallRemoteFunction("OnGameModeGMX", "i", gamemodeStartCount);
    }
    ++gamemodeStartCount;
    return 1;
}

//gamemode

forward OnGameModeGMX(gmxCount);
public OnGameModeGMX(gmxCount)
{
    printf("[OnGameModeGMX]: %d", gmxCount);
    return 1;
}

Last edited by Kar; 21/04/2015 at 10:57 PM.
Kar is offline   Reply With Quote
Old 01/09/2015, 10:02 AM   #314
MarvinPWN
Big Clucker
 
Join Date: Jul 2015
Posts: 143
Reputation: 15
Default Re: General Reference

1.)
PHP Code:
stock ReturnPlayerID(name[])// by MarvinPWN - 08.15
{
    new 
p_name[MAX_PLAYER_NAME];
    for(new 
i;i<MAX_PLAYERS;i++)
    {
        if(!
GetPlayerName(i,p_name,sizeof(p_name)) || IsPlayerNPC(i))continue;
        if(!
strcmp(name,p_name,true))return i;
    }
    return -
1;

Description:
If you want to get the ID of a certain player (you only know the name) you can use this function.
Example:
PHP Code:
printf("The ID of the name MarvinPWN is: %d",ReturnPlayerID("MarvinPWN")); 
2.)
PHP Code:
stock GetOnlinePlayers()// by MarvinPWN - 08.15
{
    new 
iOnline;
    for(new 
i,GetMaxPlayers();i<g;i++)
    {
        if(!
IsPlayerConnected(i) || IsPlayerNPC(i))continue;
        
iOnline ++;
    }
    return 
iOnline;

Description:
With this function you have the possibility to get the current online players.
Example:
PHP Code:
printf("Currently there are %d players on the server!",GetOnlinePlayers()); 
__________________
Best regards,
MarvinPWN

Last edited by MarvinPWN; 01/09/2015 at 10:55 AM.
MarvinPWN is offline   Reply With Quote
Old 01/09/2015, 10:41 AM   #315
SoFahim
Gangsta
 
SoFahim's Avatar
 
Join Date: May 2015
Location: Bangladesh.
Posts: 941
Reputation: 82
Default Re: General Reference

Please fix all links. They are not valid
__________________
I am not inactive but currently working for a official server, which not giving me time to release my new works.
Quote:
SoFahim is offline   Reply With Quote
Old 01/09/2015, 10:56 AM   #316
MarvinPWN
Big Clucker
 
Join Date: Jul 2015
Posts: 143
Reputation: 15
Default Re: General Reference

Quote:
Originally Posted by SoFahim View Post
Please fix all links. They are not valid
Which links do you mean?
__________________
Best regards,
MarvinPWN
MarvinPWN is offline   Reply With Quote
Old 17/10/2015, 04:03 PM   #317
Yashas
Gangsta
 
Join Date: Jun 2012
Location: India
Posts: 875
Reputation: 266
Default Re: General Reference

Default Ammo given by Weapon Pickups

Pickup IDPickup NameAmmo Given
321Regular Dildo1
322White Dildo1
323Vibrator1
324Another Vibrator1
325Flowers1
326Cane1
331Brass Knuckles1
333Golf Club1
334Night Stick1
335Combat Knife1
336Baseball Bat1
337Shovel1
338Pool Cue1
339Katana1
341Chainsaw1
342Frag Grenade8
343Tear Gas Grenade8
344Molotov Cocktail8
346Colt 45 Pistol30
347Silenced Colt 45 Pistol10
348Desert Eagle10
349Regular Shotgun15
350Sawn-Off Shotgun10
351Combat Shotgun/SPAZ-1210
352Micro UZI60
353MP560
355AK-47 Assault Rifle80
356M4 Assault Rifle80
357Country Rifle20
358Sniper Rifle10
359Rocket Launcher4
360Heat Seeking Rocket Launcher3
361Flamethrower100 (Client see it as 10)
362Minigun500
363Satchel Charges5
365Spray Paint Can500
367Camera36
368Night Vision GogglesCannot be collected as pickup
369Infra-Red ******sCannot be collected as a pickup
371Parachute1
372Tech-960
Yashas is offline   Reply With Quote
Old 05/02/2016, 07:24 AM   #318
GangstaSunny
Big Clucker
 
Join Date: Nov 2014
Posts: 155
Reputation: 45
Default Re: General Reference

PHP Code:
stock GetNulledTimeFormat()
{
    new 
YearMonthDayHourMinuteSecond;
    new 
monthstr[11], daystr[11], hourstr[11], minutestr[11], secondstr[11], result[32];
    
getdate(YearMonthDay); gettime(HourMinuteSecond);
    
    if(
Day 9){format(daystr,sizeof(daystr),"%d",Day);}
     else if(
Day 10){format(daystr,sizeof(daystr),"0%d.",Day);}
    
     if(
Month 9){format(monthstr,sizeof(monthstr),"%d.%d",Month,Year);}
     else if(
Month 10){format(monthstr,sizeof(monthstr),"0%d.%d",Month,Year);}
     
     if(
Hour 9){format(hourstr,sizeof(hourstr)," %d:",Hour);}
     else if(
Hour 10){format(hourstr,sizeof(hourstr)," 0%d:",Hour);}
     
     if(
Minute 9){format(minutestr,sizeof(minutestr),"%d:",Minute);}
     else if(
Minute 10){format(minutestr,sizeof(minutestr),"0%d:",Minute);}
     
     if(
Second 9){format(secondstr,sizeof(secondstr),"%d",Second);}
     else if(
Second 10){format(secondstr,sizeof(secondstr),"0%d",Second);}
     
     
strcat(resultdaystr); strcat(resultmonthstr); strcat(resulthourstr);
     
strcat(resultminutestr); strcat(resultsecondstr);
     return 
result;

Code:
Will return something like | 05.02.2016 08:25:10
GangstaSunny is offline   Reply With Quote
Old 10/02/2016, 12:36 PM   #319
Crayder
High-roller
 
Crayder's Avatar
 
Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,857
Reputation: 569
Default Re: General Reference

Quote:
Originally Posted by GangstaSunny View Post
PHP Code:
stock GetNulledTimeFormat()
{
    new 
YearMonthDayHourMinuteSecond;
    new 
monthstr[11], daystr[11], hourstr[11], minutestr[11], secondstr[11], result[32];
    
getdate(YearMonthDay); gettime(HourMinuteSecond);
    
    if(
Day 9){format(daystr,sizeof(daystr),"%d",Day);}
     else if(
Day 10){format(daystr,sizeof(daystr),"0%d.",Day);}
    
     if(
Month 9){format(monthstr,sizeof(monthstr),"%d.%d",Month,Year);}
     else if(
Month 10){format(monthstr,sizeof(monthstr),"0%d.%d",Month,Year);}
     
     if(
Hour 9){format(hourstr,sizeof(hourstr)," %d:",Hour);}
     else if(
Hour 10){format(hourstr,sizeof(hourstr)," 0%d:",Hour);}
     
     if(
Minute 9){format(minutestr,sizeof(minutestr),"%d:",Minute);}
     else if(
Minute 10){format(minutestr,sizeof(minutestr),"0%d:",Minute);}
     
     if(
Second 9){format(secondstr,sizeof(secondstr),"%d",Second);}
     else if(
Second 10){format(secondstr,sizeof(secondstr),"0%d",Second);}
     
     
strcat(resultdaystr); strcat(resultmonthstr); strcat(resulthourstr);
     
strcat(resultminutestr); strcat(resultsecondstr);
     return 
result;

Code:
Will return something like | 05.02.2016 08:25:10
First off, this should be in Useful Functions.

Now, learn more about formatting...
Code:
 	if(Second > 9){format(secondstr,sizeof(secondstr),"%d",Second);}
 	else if(Second < 10){format(secondstr,sizeof(secondstr),"0%d",Second);}
Could simply be this:
Code:
 	format(secondstr,sizeof(secondstr),"%02d",Second);
The '0' is to make it use leading zeros, '2' is the 'at least this many characters' amount.
__________________
Those who deserve reputation, do not need to beg for it.
Also, don't expect the help you need when offering reputation, you'll just be attracting Rep Hunters.
Join SA-MP Discord!
Crayder is offline   Reply With Quote
Old 15/04/2017, 09:05 PM   #320
AndreiWow
High-roller
 
AndreiWow's Avatar
 
Join Date: Nov 2014
Location: Romania, Bucharest
Posts: 1,015
Reputation: 37
Default Re: General Reference

Shouldn't this topic get updated...?
AndreiWow is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to make a soldier aotumaticly be general when the general dies ? AlbanianGuy Scripting Help 35 13/05/2012 04:35 PM
Help general [ZX]_Whitewolf Help Archive 0 16/06/2010 12:04 AM
A Full Pawn Reference Jonni8 General 4 20/05/2010 11:35 PM
Team Balancer -(Fixed but someone might want to read for reference) [HLF]Southclaw Help Archive 4 26/01/2010 08:24 AM
[SOLVED!] Strings as reference parameters... XPlatform Plugin Development 4 23/08/2009 11:40 PM


All times are GMT. The time now is 02:06 AM.


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