How to add Shops in you're server? [RP SERVER]
#1

how to add shops in my server, like clothes/weapon/ shops. i hope that i can get a answer by someone.
Reply
#2

Its easy.Make pickups for entrances to the shops, then pickups with dialogs for items
Reply
#3

okay, maybe u dont know that i am a fuckking noob so) can u explain me exact how to make entrces for shops
Reply
#4

under #include <a_samp> place this:
Код:
new enter;
new leave;
new Float:saveX[MAX_PLAYERS], Float:saveY[MAX_PLAYERS], Float:saveZ[MAX_PLAYERS];
You will find it at the very top.

Under public OnGameModeInit() place this:
Код:
DisableInteriorEnterExits();
enter = CreatePickup(1318, 1 , 2117.5488, 897.1446, 11.1797, -1);
leave = CreatePickup(1318, 1, -26.4579,-57.4797,1003.5469, -1);
return 1;
Under public OnPlayerCommandText(playerid, cmdtext[]) place this:
Код:
if(strcmp("/enter", cmdtext, true) == 0)
	{
	    if(IsPlayerInRangeOfPoint(playerid, 5.0, 2117.5488, 897.1446, 11.1797))
	    {
	        GetPlayerPos(playerid, saveX[playerid], saveY[playerid], saveZ[playerid]);
	        SetPlayerPos(playerid, -26.691598, -55.714897, 1003.546875);
	        SetPlayerInterior(playerid,6);
	    }
	    return 1;
	}
	if(strcmp("/exit", cmdtext, true) == 0)
	{
	    if(IsPlayerInRangeOfPoint(playerid, 5.0, -26.4579,-57.4797,1003.5469))
	    {
	        GetPlayerPos(playerid, saveX[playerid], saveY[playerid], saveZ[playerid]);
	        SetPlayerPos(playerid, 2117.5488, 897.1446, 11.1797);
	        SetPlayerInterior(playerid,0);
 		}
 		return 1;
 	}
	return 0;
}
Under public OnPlayerPickUpPickup(playerid, pickupid) place this:
Код:
	if(pickupid == enter)
	{
        GameTextForPlayer(playerid,"Type~y~/enter",5000, 5);
	}
	if(pickupid == leave)
	{
	    GameTextForPlayer(playerid,"Type~y~/exit",5000, 5);
	}
	return 1;
}
Sorry for keep you weating but i was testing it. its working fine
Reply
#5

thank you broo but a prob: if i go to pawn and i do RUN AS ADMINISTRATOR and then i go to file-new
i dont get something
Reply
#6

Is there any error coming up?
Reply
#7

no if i press new file i just get a empty page
Reply
#8

Try to re-download it. If that doesn`t help, i don`t know what will
Reply
#9

how to re-download pawno?
Reply
#10

http://www.sa-mp.com/download.php
You will see "SA-MP 0.3x Windows Server" click on it and download it.
You will find the server stuff and pawn as well.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)