Welcome, Guest |
You have to register before you can post on our site.
|
Forum Statistics |
» Members: 7,525
» Latest member: v01dtrace
» Forum threads: 2,416
» Forum posts: 12,368
Full Statistics
|
Online Users |
There are currently 528 online users. » 1 Member(s) | 523 Guest(s) Bing, Google, Facebook, Yandex, ysldeniss
|
|
|
Help! How hidden the skin select button when the player will spawn ? |
Posted by: PutuSuhartawan - 2021-04-18, 04:52 AM - Forum: Pawn Scripting
- Replies (1)
|
 |
i have problem with this function
Code: public OnPlayerRequestSpawn(playerid)
{
if(IsPlayerNPC(playerid)) return 1;
? SEM(playerid, "OnPlayerRequestSpawn");
if(!IsPlayerNPC(playerid))
{
? ? TogglePlayerSpectating(playerid, 1);
//return cmd_spawn(playerid);
SendClientMessage(playerid, -1, "You are detect was not an NPC sir");
if(!PLAYER_STATE_SPAWNED)
{
SpawnPlayer(playerid);
return cmd_rumahsakit(playerid);
}
return cmd_rumahsakit(playerid);
}
}
Code: public OnPlayerRequestClass(playerid, classid)
{
? StatusBaruLogin[playerid] = 1;
if(IsPlayerNPC(playerid)) return 1;
? TogglePlayerSpectating(playerid, 1);
? SpawnPlayer(playerid);
? /*
? SetSpawnInfo(0, 0, 0, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0);
? SetPlayerCameraPos(playerid, Float:1494.7446, Float:-2293.4832, Float:18.2991);
? SetPlayerCameraLookAt(playerid, Float:1494.7446, Float:-3763.4832, Float:12.29911557, CAMERA_MOVE);
? */
?
?
? cmd_rumahsakit(playerid);
? SEM(playerid, "OnPlayerRequestClass");
if(!PLAYER_STATE_SPAWNED)
{
? ?
SpawnPlayer(playerid);
return 1;
}
How to remove select player class or skin system on player will spawn?
|
|
|
[SOLVED] How users can fishing anywhere as long as there is water everywhere. |
Posted by: PutuSuhartawan - 2021-04-18, 04:43 AM - Forum: Pawn Scripting
- Replies (11)
|
 |
SOLUTION with?Radical?Pinch?AbyssMorgan?arber:
?Code: #include <progress2>
[/font][/size][/color]
#include <foreach>// color with string
#include <3DTryg>
#include <colandreas>
// the variabel meaning of water object
#define? ? ? ? FISH_THRESHOLD? ? ? ? ? ? 3.0
#define? ? ? ? WATER_CHECK_RADIUS? ? ? ? 15.0
IsPlayerNearWater(playerid)
{
? ? new
Float:x,
Float:y,
Float:z,
Float:cx,
Float:cy,
Float:cz,
Float:angle;
? ? GetPlayerPos(playerid, x, y, z);
? ? // Will not work near the dam
? ? if(z > 0.0 && z < FISH_THRESHOLD)
? ? {
? ? ? ? for(new i = 0; i < 4; i)
? ? ? ? {
? ? ? ? ? ? cx = x (WATER_CHECK_RADIUS * floatsin(-angle, degrees));
? ? ? ? ? ? cy = y (WATER_CHECK_RADIUS * floatcos(-angle, degrees));
? ? ? ? ? ? angle = 90.0;
? ? ? ? ? ? CA_FindZ_For2DCoord(cx, cy, cz);
? ? ? ? ? ? // Doesn't work under bridges
? ? ? ? ? ? if(cz == 0.0) return 1;
? ? ? ? }
? ? }
? ? return 0;
}
CMD:fish(playerid, params[])
{
if (IsPlayerNearWater(playerid))
//if(IsPlayerInRangeOfPoint(playerid, 100.0, 1062.4270,-2567.9729,-0.5079)) // lokasi mancing
{
? ? ? ? if(WormAttached[playerid] < 1) return SendClientMessage(playerid, COLOR_LIGHTRED, ""COL_LIGHTBLUE"FISH: "COL_WHITE"Sir sorry you need to have a bait worm attached to the fishing rod to fish with"COL_YELLOW"'/attachworm'");
? ? ? ? if(FishingEquipped[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to have your fishing rod equipped.");
? ? ? ? if(Fishing[playerid] == true) return SendClientMessage(playerid, COLOR_LIGHTRED, "You are already fishing.");
? ? ? ? if(pInfo[playerid][pFishes] > 5)
? ? {
? ? SendClientMessage(playerid, COLOR_LGREEN, ""COL_LIGHTBLUE"FISH: "COL_WHITE"Please the fish the on sale first with "COL_YELLOW"'/sellfish'");
? ? cmd_fishingrod(playerid);
? ? ApplyAnimation(playerid, "PED", "idle_taxi", 4.0, 0, 1, 1, 1, -1, 1);
? ? return 1;
? ? }
? new string[140];
format(string, sizeof(string), "* %s begins to fish with his fishing rod.", GetRPName(playerid));
LocalMessage(ACTION_DISTANCE, playerid, ACTION_COLOR, string);
? fish[playerid] = 2; //change it with the timer time
? new Float:BBCoord[4];
? ? GetPlayerPos(playerid, BBCoord[0], BBCoord[1], BBCoord[2]);
? ? GetPlayerFacingAngle(playerid, BBCoord[3]);
EfekPancingan[playerid] = SpawnObject_InfrontOfPlayer(playerid, 18717);
//CreateDynamicObject(18717, BBCoord[0], BBCoord[1], BBCoord[2]-2.4, 0.0, 0.0, 0.0, 0,? 0);
? ? TimerFish[playerid] = SetTimerEx("timerFish", 1000, 1, "i", playerid);
? ? TogglePlayerControllable(playerid, 0);
? ? WormAttached[playerid] = 0;
? ? ApplyAnimation(playerid, "ped", "ARRESTgun", 4.0, 0, 1, 1, 1, -1, 1);
? ? Fishing[playerid] = true;
?
?
}
else return SendClientMessage(playerid, COLOR_RED, "You can't sir fishing here with out river .");
? return 1;
}
THE PROBLEM:
Code: i just know IsPlayerInRangeOfPoint,
if (IsPlayerInRangeOfPoint(playerid, 7.0, 2695.6880, -1704.6300, 11.8438))
? ? {
? ? ? ? SendClientMessage(playerid,0xFFFFFFFF,"Need around water area to fishing");
? ? }
[color=#333333][size=small][font=Tahoma, Verdana, Arial, sans-serif][color=#333333][size=small][font=Tahoma, Verdana, Arial, sans-serif]
[/font][/size][/color]
|
|
|
Server economy ideas? |
Posted by: Snow - 2021-04-16, 11:06 PM - Forum: General Discussions
- Replies (2)
|
 |
So I am running a freeroam server and I'm pretty much stuck at server economy. There are not much uses of money atm. Right now, money can be used for buying houses, adding objects in the house, attaching objects on the skin and buying weapons. Not to forget a little amount that gets deducted on death. I think its not much for a freeroam server but then again, its freeroam so limiting things such as vehicles to money will be bad for server aswell. So what are your suggestions?
|
|
|
Sending message to all owner of key (from SQL) |
Posted by: Axitz - 2021-04-16, 10:46 PM - Forum: Pawn Scripting
- Replies (1)
|
 |
Hi,
How do I make something like sending message to all key's holder from sql function?
example like :
PHP Code: mysql_format(sqldata, pQuery, sizeof pQuery, "SELECT doorkey FROM `bizkeys` WHERE bizid = %d;", bizid);
new Cache:result = mysql_query(sqldata, pQuery);
then?
sendclientmsg to all holder of "doorkey" from bizid = %d.
or something.
|
|
|
Getting the size of an array |
Posted by: Torque - 2021-04-16, 02:37 PM - Forum: Pawn Scripting
- Replies (3)
|
 |
I have a multi-dimensional array, and I want to get the size of each line.
Code: new BusRoutes[][] = {
? ? {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10},
? ? {0, 11, 12, 13, 14, 15, 16, 17, 18, 19, 10}
};
Code: new const MaxStops[] = sizeof(BusRoutes[]);
Code: format(sStops, sizeof(sStops), "Stops: 0/%d", MaxStops[vRoute]);
If vRoute = 0, it works fine, but if it equals 1, the function crashes and it doesn't continue running the rest of the function. Something is wrong with MaxStops[vRoute] if vRoute equals anything other than 0.
What am I doing wrong?
|
|
|
HELP! how to edit a dynamic object attached to vehicle stucked position |
Posted by: PutuSuhartawan - 2021-04-16, 12:42 AM - Forum: Pawn Scripting
- Replies (5)
|
 |
Code: CMD:objekkendaraan(playerid, params[])
{
//SetPlayerArmour(playerid, Float:70.1);
//pakaiarmour[playerid] = 1; // kondisi sedang pakai armour
//SetPlayerAttachedObject(playerid, 3, 19515, 1 , 0.096999,0.058999,0.012999,4.199995,0.999981,8.800023,1.000000,1.221000,0.797000, 0xFFFFA500, 0xFFFFA500);
//EditAttachedObject(playerid, 3);
//contohdikendaraan = CreateDynamicObject(18649, 0,0,0,0,0,0);
//CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_OBJECT_SD, Float:drawdistance = STREAMER_OBJECT_DD, STREAMER_TAG_AREA areaid = STREAMER_TAG_AREA -1, priority = 0)
//CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_OBJECT_SD, Float:drawdistance = STREAMER_OBJECT_DD, STREAMER_TAG_AREA areaid = STREAMER_TAG_AREA -1, priority = 0)
contohdikendaraan = CreateDynamicObject(18649, Float:0.0, Float:0.0, Float:0.0, Float:0.0, Float:0.0, Float:0.0, 0, 0, -1, Float:20.0,Float:20.0, -1, 0);
SendClientMessage(playerid, COLOR_GREEN, "Anda pasang neon hijau.");
//SetDynamicObjectMaterialText(tmpobjid, 0, "Pesawat Putu", 130, "Arial", 70, 1, 0xFFFFFFFF, 0x00000000, 1);
//SetDynamicObjectMaterialText(STREAMER_TAG_OBJECT contohdikendaraan, 0, "Solusi", 130, "Arial", 70, 1,? 0xFFFFFFFF, 0, 1);
//AttachObjectToVehicle(objectid, vehicleid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:RotX, Float:RotY, Float:RotZ)
pInfo[playerid][pNeon] = AttachDynamicObjectToVehicle( contohdikendaraan, GetPlayerVehicleID(playerid));
? /*
? Float:0.0, // kanan kiri
? Float:-2.0, // kedepan
? ? Float:0.0, // ke atas
? ? Float:2.0, Float:0.0, Float:0.0);
? */
//AttachDynamicObjectToVehicle(STREAMER_TAG_OBJECT objectid, vehicleid, Float:offsetx, Float:offsety, Float:offsetz, Float:rx, Float:ry, Float:rz)
//EditPlayerObject(playerid, objectid);
//RemovePlayerFromVehicle(playerid);
//EditAttachedObject(playerid, idterttach);
//EditObject(playerid, contohdikendaraan);
//contohdikendaraan = false;
? //Streamer_SetIntData(STREAMER_TYPE_OBJECT, contohdikendaraan, E_STREAMER_ATTACHED_VEHICLE, 2);
//Streamer_SetFloatData(
? //SetDynamicObjectMaterial(contohdikendaraan, 0, 10765, "airportgnd_sfse", "white", -256);
EditDynamicObject(playerid, contohdikendaraan);
? Streamer_Update(playerid);
//EditDynamicObject(playerid, pInfo[playerid][pNeon]);
//EditAttachedObject(playerid, contohdikendaraan);
return 1;
}
|
|
|
|