| Welcome, Guest |
You have to register before you can post on our site.
|
| Online Users |
There are currently 441 online users. » 0 Member(s) | 437 Guest(s) Google, Baidu, Bing, DuckDuckGo
|
| Latest Threads |
undefined symbol
Forum: Portuguese/Portugu?s
Last Post: leobradoks
2025-10-25, 08:58 PM
» Replies: 1
» Views: 1,580
|
SA:MP Custom Character Li...
Forum: General Discussions
Last Post: Dilshad
2025-10-22, 04:15 PM
» Replies: 0
» Views: 40
|
Anyone got old rp scripts...
Forum: General Discussions
Last Post: Bilal
2025-10-21, 01:02 PM
» Replies: 5
» Views: 5,222
|
Anyone has the SARP Gamem...
Forum: Gamemodes
Last Post: Bilal
2025-10-21, 12:59 PM
» Replies: 0
» Views: 76
|
SARP Gamemode
Forum: Releases
Last Post: Bilal
2025-10-21, 12:58 PM
» Replies: 0
» Views: 56
|
Need To Hire Pawno Coder....
Forum: General Discussions
Last Post: Dilshad
2025-10-21, 06:20 AM
» Replies: 1
» Views: 798
|
Original Godfather
Forum: Pawn Scripting
Last Post: NmE
2025-10-20, 11:48 AM
» Replies: 3
» Views: 237
|
What would you start?
Forum: Life
Last Post: vuongtrungnu13
2025-10-20, 01:55 AM
» Replies: 4
» Views: 9,843
|
People who have one of th...
Forum: Tech
Last Post: vuongtrungnu13
2025-10-20, 01:39 AM
» Replies: 2
» Views: 5,182
|
After School Community
Forum: Advertisements
Last Post: cosminupgaming
2025-10-19, 12:42 PM
» Replies: 0
» Views: 109
|
|
|
| what is this? |
|
Posted by: Axzyl - 2025-03-28, 09:28 PM - Forum: Pawn Scripting
- No Replies
|
 |
(40) : warning 213: tag mismatch: expected tag none ("_"), but found "Float"
(40) : warning 213: tag mismatch: expected tag none ("_"), but found "Float"
(41) : warning 213: tag mismatch: expected tag none ("_"), but found "Float"
(41) : warning 213: tag mismatch: expected tag none ("_"), but found "Float"
(49) : warning 213: tag mismatch: expected tag none ("_"), but found "Float"
(59) : warning 239: literal array/string passed to a non-const parameter
(121) : warning 203: symbol is never used: "banish"
(121) : warning 203: symbol is never used: "ghosthunt"
(121) : warning 203: symbol is never used: "radar"
///////////////////////////////////////////////////////////////////////////////////////////////////////////
#include <a_samp>
#include <a_players>
#include <a_vehicles>
#include <a_npc>
#include <a_objects>
#define GHOST_VEHICLE_ID 487
#define GHOST_HUNTER_SKIN 20
#define GHOST_VAN_MODEL 487
#define GHOST_HUNTER_TEAM 1
new g_Hunters[MAX_PLAYERS];
stock SpawnGhostVan(playerid) {
new Float:x, Float:y, Float:z, Float:angle;
GetPlayerPos(playerid, x, y, z);
angle = GetPlayerFacingAngle(playerid);
vehicleid = AddStaticVehicle(GHOST_VEHICLE_ID, x + 5.0, y + 5.0, z, angle, 0, 0);
SetVehicleInvulnerable(vehicleid, 1);
SetVehicleColor(vehicleid, 0, 0);
return vehicleid;
}
CMD:ghosthunt(playerid, params[]) {
if (g_Hunters[playerid] == 1) {
SendClientMessage(playerid, 0xFF0000FF, "You are already a Ghost Hunter!");
return 1;
}
g_Hunters[playerid] = 1;
SetPlayerSkin(playerid, GHOST_HUNTER_SKIN);
SendClientMessage(playerid, 0x00FF00FF, "You are now a Ghost Hunter! Use your Ghost Van to track and defeat paranormal creatures!");
SpawnGhostVan(playerid);
return 1;
}
stock SpawnGhost() {
new Float:x, Float:y, Float:z;
x = random_float(-2500.0, 2500.0);
y = random_float(-2500.0, 2500.0);
z = 1000.0;
AddPlayerClass(26, x, y, z, 180.0, 0, 0, 0, 0, 0, 0);
return 1;
}
stock random_float(min, max) {
return min + (random(max - min) / 1000.0);
}
stock random_int(min, max) {
return random(max - min) + min;
}
public RandomGhostEvent();
public OnGameModeInit() {
SetTimer("RandomGhostEvent", 60000, true);
return 1;
}
public RandomGhostEvent() {
if (random_int(0, 10) > 5) {
SpawnGhost();
}
return 1;
}
CMD:radar(playerid, params[]) {
if (g_Hunters[playerid] == 0) {
SendClientMessage(playerid, 0xFF0000FF, "You need to be a Ghost Hunter to use the radar!");
return 1;
}
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
for (new i = 0; i < MAX_PLAYERS; i++) {
if (IsPlayerConnected(i) && g_Hunters[i] == 0) {
new Float gx, Float gy, Float gz;
GetPlayerPos(i, gx, gy, gz);
if (GetDistanceBetweenCoords(x, y, z, gx, gy, gz) < 50.0) {
SendClientMessage(playerid, 0x00FF00FF, "Ghost detected nearby! Use your van to track it down!");
}
}
}
return 1;
}
CMD:banish(playerid, params[]) {
if (g_Hunters[playerid] == 0) {
SendClientMessage(playerid, 0xFF0000FF, "You need to be a Ghost Hunter to use the banish ability!");
return 1;
}
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
for (new i = 0; i < MAX_PLAYERS; i++) {
if (IsPlayerConnected(i) && g_Hunters[i] == 0) {
new Float gx, Float gy, Float gz;
GetPlayerPos(i, gx, gy, gz);
if (GetDistanceBetweenCoords(x, y, z, gx, gy, gz) < 50.0) {
SendClientMessage(playerid, 0x00FF00FF, "Ghost successfully banished!");
return 1;
}
}
}
SendClientMessage(playerid, 0xFF0000FF, "No ghost nearby to banish!");
return 1;
}
public OnPlayerEnterCheckpoint(playerid) {
if (g_Hunters[playerid] == 1) {
SendClientMessage(playerid, 0x0000FFFF, "You're near a haunted spot. Use your radar to find ghosts!");
}
return 1;
}
|
|
|
|
help with hotdog vendor samp |
|
Posted by: Axzyl - 2025-03-24, 09:02 AM - Forum: Pawn Scripting
- Replies (4)
|
 |
#include <a_samp>
#define VEHICLE_MODEL_ID 588
#define SELLER_SKIN 40
#define HOTDOG_COST 100
#define HOTDOG_HP 100
#define SELLER_REWARD 3000
#define MAX_VENDORS 5 // You can set this to the maximum number of vendor vehicles you want to allow
#define KEY_2 0x2000 // Define 2 key
#define KEY_LALT 0x40000 // Define Left Alt key
#define COLOR_GREEN 0x00FF00FF
#define COLOR_YELLOW 0xFFFF00FF
#define COLOR_WHITE 0xFFFFFFFF
#define COLOR_RED 0xFF0000FF
new g_VehicleIDs[MAX_VENDORS];
new g_Sellers[MAX_VENDORS] = {INVALID_PLAYER_ID, INVALID_PLAYER_ID, INVALID_PLAYER_ID, INVALID_PLAYER_ID, INVALID_PLAYER_ID};
new g_VendorSelling[MAX_VENDORS] = {false, false, false, false, false};
// Coordinates for vehicle spawn
new Float:spawnX = 404.0;
new Float:spawnY = 2135.5701;
new Float:spawnZ = 1442.1515;
new Float:spawnAngle = 269.9492;
public OnGameModeInit()
{
// Spawn multiple vehicles at specified coordinates
for (new i = 0; i < MAX_VENDORS; i++)
{
g_VehicleIDs[i] = AddStaticVehicle(VEHICLE_MODEL_ID, spawnX + (i * 3), spawnY, spawnZ, spawnAngle, 1, 1); // Slight offset to avoid overlap
}
SetTimer("CheckVehiclePositions", 300000, true); // Check every 5 minutes for vehicles' positions
return 1;
}
// Pressing "2" to toggle selling hotdogs
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
// Check if player presses "2"
if (newkeys & KEY_2)
{
// Check if the player is inside a vendor vehicle (ID 588)
new vehicleid = GetPlayerVehicleID(playerid);
if (vehicleid != INVALID_VEHICLE_ID && GetVehicleModel(vehicleid) == VEHICLE_MODEL_ID)
{
// Loop through all vendor vehicles to find the player's assigned vehicle
for (new i = 0; i < MAX_VENDORS; i++)
{
if (g_VehicleIDs[i] == vehicleid) // The player is inside a valid vendor vehicle
{
// Check if the player is already a vendor
if (g_Sellers[i] == INVALID_PLAYER_ID)
{
g_Sellers[i] = playerid; // Assign the player as the vendor for this vehicle
g_VendorSelling[i] = true; // Start selling for this vehicle
SendClientMessage(playerid, COLOR_GREEN, "You are now the Hotdog Vendor!");
SendClientMessageToAll(COLOR_YELLOW, "A new Hotdog vendor has started selling!");
}
break;
}
}
}
}
// If player presses Left Alt (KEY_LALT) to buy hotdog
if (newkeys & KEY_LALT)
{
// Loop through all vendor vehicles
for (new i = 0; i < MAX_VENDORS; i++)
{
if (g_VendorSelling[i] && !IsPlayerInVehicle(playerid)) // Ensure player is not in vehicle and vendor is selling
{
if (GetPlayerMoney(playerid) >= HOTDOG_COST)
{
// Increase health
new currentHealth = GetPlayerHealth(playerid);
SetPlayerHealth(playerid, currentHealth + HOTDOG_HP);
// Subtract money
GivePlayerMoney(playerid, -HOTDOG_COST);
SendClientMessage(playerid, COLOR_WHITE, "You bought a Hotdog and gained 100 HP!");
// Give seller reward
if (g_Sellers[i] != INVALID_PLAYER_ID)
{
GivePlayerMoney(g_Sellers[i], SELLER_REWARD);
SendClientMessage(g_Sellers[i], COLOR_YELLOW, "You earned $3000 from a Hotdog sale!");
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "You don't have enough money for a Hotdog!");
}
}
}
}
return 1;
}
// When a player exits a vehicle, they stop being the vendor
public OnPlayerExitVehicle(playerid, vehicleid)
{
for (new i = 0; i < MAX_VENDORS; i++)
{
if (vehicleid == g_VehicleIDs[i] && playerid == g_Sellers[i]) // If the player leaves the vendor vehicle
{
SendClientMessage(playerid, COLOR_RED, "You have left the vehicle and stopped selling hotdogs.");
g_Sellers[i] = INVALID_PLAYER_ID; // Clear the vendor role
g_VendorSelling[i] = false; // Stop selling hotdogs for this vehicle
}
}
return 1;
}
// Check if any vehicle is moved, respawn if needed
forward CheckVehiclePositions();
public CheckVehiclePositions()
{
for (new i = 0; i < MAX_VENDORS; i++)
{
// Check if the vendor vehicle exists at the spawn location
new Float:vehX, Float:vehY, Float:vehZ;
GetVehiclePos(g_VehicleIDs[i], vehX, vehY, vehZ);
// If the vendor vehicle is not at the spawn location
if (floatabs(vehX - (spawnX + (i * 3))) > 10.0 || floatabs(vehY - spawnY) > 10.0 || floatabs(vehZ - spawnZ) > 10.0) // 10 units tolerance
{
// Try to spawn a new vehicle if it doesn't exist at the spawn point
new vehicleid = INVALID_VEHICLE_ID;
// Loop through all possible vehicle IDs (vehicle IDs are indexed from 1)
for (new vehicleIndex = 1; vehicleIndex <= MAX_VEHICLES; vehicleIndex++)
{
vehicleid = vehicleIndex; // Check each vehicle ID
if (vehicleid != INVALID_VEHICLE_ID)
{
new Float:checkX, Float:checkY, Float:checkZ;
GetVehiclePos(vehicleid, checkX, checkY, checkZ);
// If vehicle is within a 10-unit radius of the spawn location
if (floatabs(checkX - (spawnX + (i * 3))) <= 10.0 && floatabs(checkY - spawnY) <= 10.0 && floatabs(checkZ - spawnZ) <= 10.0)
{
// Vehicle is close enough, no need to respawn
vehicleid = INVALID_VEHICLE_ID;
break;
}
}
}
// If no vehicle found at spawn point, spawn a new one
if (vehicleid == INVALID_VEHICLE_ID)
{
g_VehicleIDs[i] = AddStaticVehicle(VEHICLE_MODEL_ID, spawnX + (i * 3), spawnY, spawnZ, spawnAngle, 1, 1);
SendClientMessageToAll(COLOR_YELLOW, "A vendor vehicle has been reset to its original location!");
}
}
}
return 1;
}
so this: SetTimer("CheckVehiclePositions", 300000, true); // Check every 5 minutes for vehicles' positions and this: if (g_VendorSelling[i] && !IsPlayerInVehicle(playerid)) // Ensure player is not in vehicle and vendor is selling and this: new currentHealth = GetPlayerHealth(playerid); has warning messages saying for the first one: (36) warning 239: literal array/string passed to a non-const parameter second one: (75) warning 202: number of arguments does not match definition and third one: (81) warning 202: number of arguments does not match definition. please help ;3
|
|
|
|
| Making a scratch RP server. Suggestions? |
|
Posted by: stellab - 2025-03-23, 09:11 PM - Forum: Pawn Scripting
- Replies (1)
|
 |
Basically what the title says. I'd like some suggestions to what I could add into my server, I've got a few things already.
I know SAMP RP servers have died off, but my love for SAMP and roleplaying on the platform has not. So I'm here to bring something fresh, something new. No edits, no code copies, all from the basic .pwn file.
At the moment I have the following:
I will not release any script context as it could potentially lead to somebody finding a way to copy the script and claiming it as their own.
Login & Register [no master account]
Player death system [Currently semi-bugged but working on it]
EMS Faction + EMS Ranks + Ambulances + Faction locked + hospital interior
Police Faction + Police ranks, no vehicles yet, no interior yet
Businesses (4 types so far)
Vehicle Damages, Repairs, and Functions
Quarry Side-Job
Level System
Paychecks
Player stats dialog
Clothing selection
Ammunition boxes - working on compatibility with guns in slots.
Black market [Not fully finished]
Marijuana growing/planting/harvesting
Pay n sprays all over San Andreas blocked off for realism purposes
Little bit of custom mapping, it isn't the greatest.
WHAT'S NEW SINCE THE POST?
[new] Injury system [Currently semi-bugged, but working on it]
[new] Custom vehicle repair
[new] Trucker Job + Trucker Levels with varying payouts
[new] Business type restaurant
[new] Fishing activity - Catch the fish of your dreams!
[new] Housing - Store items, lock your home, and furnish it to your visions desire. [No Custom Ints Yet]
[new] Rental vehicles - Rent a car until you logout
[new] Driver's Education + Driver's License
[new] Firearms License A & B
[new] Security Enhancement - Roleplay Names Required
[new] Custom vehicle plates
[new] Able to customize the color of your car
[new] Player inventory
[new] Expanded on player vehicle ownership - Vehicle spawning, parking, locking, despawning
[new] Expanded on the /help command - added more ease of access side-commands
WHAT IS BEING WORKED ON?
More additions to EMS & PD
Different drug types & effects
Any unique ideas?
|
|
|
|
Server DeathMatch [DM, FreeRoam, Fun][PL/ENG] |
|
Posted by: Pevenaider - 2025-03-16, 04:26 PM - Forum: Advertisements
- No Replies
|
 |
Join the SDM Community Today!
Ready to kick boredom to the curb? Our server offers a whole load of fun to keep you entertained! Whether you're a newbie or a pro, we've got something for everyone. We're live on both 0.3.7 and 0.3.DL client versions.
What's waiting for you? Custom skins and objects (0.3DL), a fully functional housing system, privcars, businesses, your own company, bunkers, crazy stunt props, and a variety of mini-games including: - GangWars
- Zombie
- Hide and Seek
- Race
- Hay
- FallOut
- Tank Battles
- Sumo
- Maze Challenge
- Chicken Killer (/SP)
We also have epic arenas:
- OneShot
- DeathMatch
- Minigun Arena
Screenshots:
Our server features an Exp/Level/Reputation system where you can level up, gain reputation, and unlock awesome rewards as you play.
We’ve got VIP accounts, gangs, and a weapon of the day to keep things fresh and exciting!
Don't wait Join Today
|
|
|
|
| help |
|
Posted by: Xandy - 2025-03-07, 09:16 PM - Forum: Support
- Replies (1)
|
 |
Good afternoon, I'm new to open.mp, I have a problem in my gamemode, when some staff disconnects a player from the server, the player is not disconnected, he just stays absent and with infinite ping, I've tried to solve this in every way, if anyone can help me I will be very grateful!
|
|
|
|
|