SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 25 of 205
Search took 0.01 seconds.
Search: Posts Made By: akib
Forum: Scripting Help 20/02/2019, 04:15 PM
Replies: 10
Views: 187
Posted By akib
Re: OnPlayerDeath function not being called

Thanks for the fix, it works fine now
I just checked if killerid==INVALID_PLAYER_ID or not
Forum: Scripting Help 20/02/2019, 01:37 PM
Replies: 10
Views: 187
Posted By akib
Re: OnPlayerDeath function not being called

OnPlayerDeath now looks like

public OnPlayerDeath(playerid, killerid, reason)
{
print("Ok");
if(GroupInfo[PlayerInfo[killerid][pGroup]][gType]==GROUP_TYPE_HITMAN){
new cid,m[512];
...
Forum: Scripting Help 20/02/2019, 01:15 PM
Replies: 10
Views: 187
Posted By akib
Re: OnPlayerDeath function not being called

I have a part of my script as a include file, called groups.inc

In groups.inc, I used y_hooks, something like that Hook:gs_OnPlayerDeath(playerid,killerid,reason)

inside that i placed this code...
Forum: Scripting Help 20/02/2019, 12:03 PM
Replies: 10
Views: 187
Posted By akib
Re: OnPlayerDeath function not being called

i am having problem with my crashdetect, is there any other way?
Forum: Scripting Help 20/02/2019, 05:48 AM
Replies: 10
Views: 187
Posted By akib
Re: OnPlayerDeath function not being called

tried, killerid isn't invalid

public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid==INVALID_PLAYER_ID) return print("Error");
print("Player died");
if...
Forum: Scripting Help 20/02/2019, 02:22 AM
Replies: 10
Views: 187
Posted By akib
OnPlayerDeath function not being called

Hello, OnPlayerDeath function isn't calling in my gamemode

public OnPlayerDeath(playerid, killerid, reason)
{
print("Player died");
if (PlayerInfo[playerid][pInjured] == 0)
{...
Forum: Scripting Help 05/02/2019, 11:57 AM
Replies: 6
Views: 127
Posted By akib
Re: Help with command

Can you explain me this line
if(sscanf(cmdtext, "s[30]S()[30]", szCmdInfo, szActionInfo))

s[30]S()[30]

first s[30] is for szCMDInfo
but S() for? and why brackets?
Forum: Scripting Help 05/02/2019, 08:07 AM
Replies: 6
Views: 127
Posted By akib
Re: Help with command

I tried with zcmd, strcmp... but i am failed, please show me your example
Forum: Scripting Help 05/02/2019, 07:26 AM
Replies: 6
Views: 127
Posted By akib
Help with command

How I can make a command like this

Available Action: deposit, withdraw
Usage /fsafe [Action]

and if action == deposit then

Available Action: weapon, cash
Usage /fsafe deposit [Action]
Forum: Scripting Help 04/02/2019, 11:29 AM
Replies: 2
Views: 101
Posted By akib
Re: Dynamic3DTextLabel not destroying

ahh thanks didn't noticed that <3
Forum: Scripting Help 04/02/2019, 02:13 AM
Replies: 2
Views: 101
Posted By akib
Dynamic3DTextLabel not destroying

Hello, I am having problem, whenever i try to destroy Dynamic3Dtext it doesn't destroy..

COde
UpdatePoint(id){
new m[512];
if(PointInfo[id][point_text]){
...
Forum: Scripting Help 30/01/2019, 02:32 PM
Replies: 0
Views: 71
Posted By akib
Help me with car lock [/lock]

When I try /lock vehicle works fine but when i try /lock in near of other owned vehicles by others, it returns vehicle id -1(means no vehicle near)

/lock CMD

CMD:lock(playerid,params[]){
new...
Forum: Scripting Help 29/01/2019, 01:50 AM
Replies: 5
Views: 121
Posted By akib
Re: Help me please

so using debugger(print) i found that the bug is on creating label text

format(m, sizeof(m), "This Vehicle Is For Sell!\nVehicle Name : %s\nPrice : $%i\nDealership : %s",...
Forum: Scripting Help 29/01/2019, 01:36 AM
Replies: 5
Views: 121
Posted By akib
Re: Help me please

GetFreeDSVehiceID
GetFreeDSVehiceID()
{
for(new i=1; i<MAX_DSVEHICLES; i++)
{
if(DSVehicle[i][vehicle_sqlid]==0)return i;
}
return 0;
}
Forum: Scripting Help 28/01/2019, 05:56 PM
Replies: 5
Views: 121
Posted By akib
Help me please

Why OnDealerCarsLoad not loading all datas available in database?

OnDealerCarsLoad:
public OnDealerCarsLoad(){

new num_fields,num_rows,m[512];
cache_get_data(num_rows,num_fields,dbhandle);...
Forum: Scripting Help 28/01/2019, 03:39 PM
Replies: 3
Views: 100
Posted By akib
Re: mysql_tquery Tag Mismatch

Sorry wrong code pasted, i tried with this
mysql_format(dbhandle, m, sizeof(m), "INSERT INTO dealerships (x,y,z,name) VALUES ('%f','%f','%f','%s')",...
Forum: Scripting Help 28/01/2019, 03:27 PM
Replies: 3
Views: 100
Posted By akib
mysql_tquery Tag Mismatch

Code
CMD:adddealer(playerid,params[]){
new Float:x,Float:y,Float:z,dname[32],m[512];
if(sscanf(params, "s[32]", dname)) return SendClientMessage(playerid, COLOR_GREY, "Usage:{FFFFFF} /adddealer...
Forum: Scripting Help 27/01/2019, 11:53 AM
Replies: 0
Views: 50
Posted By akib
Need help, loading data from database

Hello, i was trying to make a dealership system dynamic

CMD will be /adddealer /adddealercar

Everything is fine but problem is OnDialogResponse

when player do /buycar on a dealership i can...
Forum: Scripting Help 23/01/2019, 02:00 PM
Replies: 6
Views: 137
Posted By akib
Re: Function not calling

Fixed, thanks!
Forum: Scripting Help 23/01/2019, 01:55 PM
Replies: 6
Views: 137
Posted By akib
Re: Function not calling

ahh shit, lemme change the code and try again, i will call select after inserting data?
Forum: Scripting Help 23/01/2019, 01:04 PM
Replies: 6
Views: 137
Posted By akib
Re: Function not calling

Defination of mysq_function_query :
mysql_function_query( connectionHandle, query[], bool:cache, callback[], format[], {Float,_}:... )


Source: https://forum.sa-mp.com/showthread.php?t=56564...
Forum: Scripting Help 23/01/2019, 12:48 PM
Replies: 6
Views: 137
Posted By akib
Re: Function not calling

mysql_function_query is now mysql_tquery

Code OnDoorsLoad
public OnDoorsLoad()
{
new num_fields,num_rows,str[512];
cache_get_data(num_rows,num_fields,dbhandle);
if(!num_rows)return 1;...
Forum: Scripting Help 23/01/2019, 12:32 PM
Replies: 6
Views: 137
Posted By akib
Function not calling

I don't know why function OnDoorsLoad calling...

Code:
CMD:door(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 3) return SendClientMessage(playerid, COLOR_ORANGE, "Error:...
Forum: Scripting Help 20/01/2019, 12:24 PM
Replies: 2
Views: 81
Posted By akib
Forum: Scripting Help 20/01/2019, 12:05 PM
Replies: 2
Views: 81
Posted By akib
Attempted to read/write array element at negative index -1

Hello, i am facing problem in my script when player disconnect (/q or from menu)

Error

[12:37:32] [debug] Run time error 4: "Array index out of bounds"
[12:37:32] [debug] Attempted to...
Showing results 1 to 25 of 205

 

All times are GMT. The time now is 05:17 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.