How to add Shops in you're server? [RP SERVER] -
Saffier - 28.08.2013
how to add shops in my server, like clothes/weapon/ shops. i hope that i can get a answer by someone.
Re: How to add Shops in you're server? [RP SERVER] -
bustern - 28.08.2013
Its easy.Make pickups for entrances to the shops, then pickups with dialogs for items
Re: How to add Shops in you're server? [RP SERVER] -
Saffier - 28.08.2013
okay, maybe u dont know that i am a fuckking noob so) can u explain me exact how to make entrces for shops
Re: How to add Shops in you're server? [RP SERVER] -
Stm - 28.08.2013
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
Re: How to add Shops in you're server? [RP SERVER] -
Saffier - 28.08.2013
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
Re: How to add Shops in you're server? [RP SERVER] -
Stm - 28.08.2013
Is there any error coming up?
Re: How to add Shops in you're server? [RP SERVER] -
Saffier - 28.08.2013
no if i press new file i just get a empty page
Re: How to add Shops in you're server? [RP SERVER] -
Stm - 28.08.2013
Try to re-download it. If that doesn`t help, i don`t know what will
Re: How to add Shops in you're server? [RP SERVER] -
Saffier - 28.08.2013
how to re-download pawno?
Re: How to add Shops in you're server? [RP SERVER] -
Stm - 28.08.2013
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.