SetPlayerShopName
From SA-MP Wiki
SetPlayerShopName
Warning: This is a new function working since SA-MP 0.3. It won't work in previous versions.
This function can be used to disable or enable the scripts (buying food, weapons etc.) in restaurants and ammunations.
(playerid, shopname[])
| playerid | The player to load the interior scripts for. |
| shopname[] | The name of the script that should be loaded. |
This function does not return a specific value, it's best to simply ignore it.
Note: This function does not work for casinos.
| Internal Shop name | What is it? |
| "FDPIZA" | Pizza Stack |
| "FDBURG" | Burger Shot |
| "FDCHICK" | Cluckin' Bell |
| "AMMUN1" | Ammunation 1 |
| "AMMUN2" | Ammunation 2 |
| "AMMUN3" | Ammunation 3 |
| "AMMUN5" | Ammunation 5 |
public OnPlayerCommandText(playerid, cmdtext[]) { if (!strcmp("/enter", cmdtext)) { SetPlayerInterior(playerid, 5); SetPlayerPos(playerid, 372.5565, -131.3607, 1001.4922); SetPlayerShopName(playerid,"FDPIZA"); SendClientMessage(playerid,0xFFFFFFFF,"Welcome to Pizza Stack!"); } }
Related Functions
The following functions might be useful as well, as they're related to this function in one way or another.
- DisableInteriorEnterExits: Disables the yellow arrows for interior entrances and exits.
- SetPlayerInterior: Sets the player interior.
- SetPlayerPos: Changes the player's position.
