SA-MP Forums

Go Back   SA-MP Forums > Search Forums

Showing results 1 to 25 of 219
Search took 0.01 seconds.
Search: Posts Made By: Aly
Forum: Scripting Help 23/05/2017, 03:11 PM
Replies: 4
Views: 526
Posted By Aly
Re: problem with YSI\YSI_Data\y_foreach

I guess you have to include YSI\y_iterate for the foreach function.
Forum: Scripting Help 22/05/2017, 07:50 AM
Replies: 7
Views: 303
Posted By Aly
Re: ?Help

You have to change it to

new PlayerText:vSpeedBox;


Put this under OnPlayerConnect:

vSpeedBox = CreatePlayerTextDraw(540.666259, 418.637756, "0");
PlayerTextDrawLetterSize(vSpeedBox,...
Forum: Scripting Help 20/05/2017, 10:24 PM
Replies: 3
Views: 553
Posted By Aly
Re: error 035: argument type mismatch (argument 2)

You can do most of those thing just under OnPlayerDeath.The only thing you can't know on OnPlayerDeath is the bodypart.

public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid !=...
Forum: Scripting Help 20/05/2017, 09:40 PM
Replies: 3
Views: 553
Posted By Aly
Re: error 035: argument type mismatch (argument 2)

SendClientMessageToAll(0x9D000096, string);
Forum: Scripting Help 20/05/2017, 07:48 PM
Replies: 15
Views: 614
Posted By Aly
Re: Loading system failing

You should check to see where you set those values to 0 and make sure it doesn't happen after you load them.
Forum: Scripting Help 20/05/2017, 03:33 PM
Replies: 5
Views: 365
Posted By Aly
Re: X337 GANG

Is "params" a string?
Are you using something like this?

CMD:mycmd(playerid, params[])
{
new color;
if(sscanf(params, "h", color))
}
Forum: Scripting Help 20/05/2017, 02:36 PM
Replies: 22
Views: 2,399
Posted By Aly
Re: Land System

/*
You will need minX, minY, maxX, maxY coords to create a gangzone.A gangzone doesn't care about Z.
*/
stock createLand(playerid, Float:X, Float:Y, Float:Z, Float:range, landSize) //Function used...
Forum: Scripting Help 20/05/2017, 02:11 PM
Replies: 2
Views: 233
Posted By Aly
Re: /stats - little weird problem

There you go

CMD:stats(playerid, params[])
{
new bstring[460];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
strcat(bstring,...
Forum: Scripting Help 20/05/2017, 02:07 PM
Replies: 22
Views: 2,399
Posted By Aly
Re: Land System

Well in the enum lInfo i added 2 more items

lSize, //Stores the maximum limit of furniture
lFurnitures, //Stores the current number of furnitures on the land


Now when you create a...
Forum: Scripting Help 20/05/2017, 01:54 PM
Replies: 22
Views: 2,399
Posted By Aly
Re: Land System

Then the code I presented you in the last comment should work just fine, but with some adjustments.
You will have to set a RANGE for each Land, it you want a variable RANGE for each size: Small,...
Forum: Scripting Help 20/05/2017, 01:37 PM
Replies: 15
Views: 614
Posted By Aly
Re: Loading system failing

Try to put some printf inside the loading function and see if the money and skin are getting loaded properly.
Forum: Scripting Help 20/05/2017, 01:17 PM
Replies: 28
Views: 601
Posted By Aly
Re: Expression [REP]

CMD:stats(playerid, params[])
{
new str[900], str2[70], giveid, AdminRank[30], weaponset[30];
if (sscanf(params, "u", giveid)) return SendClientMessage(playerid, 0x6FFF00FF,...
Forum: Scripting Help 20/05/2017, 01:14 PM
Replies: 28
Views: 601
Posted By Aly
Re: Expression [REP]

Try this:


CMD:stats(playerid, params[])
{
new str[900], str2[70], giveid, AdminRank[30], weaponset[30];
if (sscanf(params, "u", giveid)) return SendClientMessage(playerid, 0x6FFF00FF,...
Forum: Scripting Help 20/05/2017, 01:05 PM
Replies: 7
Views: 252
Posted By Aly
Re: Saving unlocked skins

If you're talking about my suggestion then you are right, mysql won't have any problem storing that information and it's easy to manipulate.
Forum: Scripting Help 20/05/2017, 01:02 PM
Replies: 15
Views: 614
Posted By Aly
Re: Loading system failing

Would you try this?


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_REGISTER:
{
if(!response)
Forum: Scripting Help 20/05/2017, 12:48 PM
Replies: 7
Views: 252
Posted By Aly
Re: Saving unlocked skins

You can create an array as you said

#define MAX_SKINS 312
new unlockedSkin[MAX_PLAYERS][MAX_SKINS]; //This is meant to be a string


And then set it to 1 if it's unlocked and to 0 if it's not...
Forum: Scripting Help 20/05/2017, 12:37 PM
Replies: 28
Views: 601
Posted By Aly
Re: Expression [REP]

CMD:stats(playerid, params[])
{
new str[900], str2[70], giveid, AdminRank[30], weaponset[30];
if (sscanf(params, "u", giveid)) return SendClientMessage(playerid, 0x6FFF00FF,...
Forum: Scripting Help 20/05/2017, 12:34 PM
Replies: 22
Views: 2,399
Posted By Aly
Re: Land System

First of all, we can remove the minX, minY, etc, but then you won't be able to show the area on the map.
For the maximum amount of furniture you can add

#define MAX_FURNITURE 20

enum lInfo
{...
Forum: Scripting Help 20/05/2017, 12:27 PM
Replies: 28
Views: 601
Posted By Aly
Re: Expression [REP]

Can you show me the lines where the error occurs?
Forum: Scripting Help 20/05/2017, 12:24 PM
Replies: 15
Views: 614
Posted By Aly
Re: Loading system failing

Now about the money and the skin, you'll have to set them after you confirm that the password is correct.
Something like:

case DIALOG_LOGIN:
{
if(!response)
return Kick(playerid);...
Forum: Scripting Help 20/05/2017, 12:18 PM
Replies: 28
Views: 601
Posted By Aly
Re: Expression [REP]

CMD:stats(playerid, params[])
{
new str[900], str2[70], giveid, AdminRank[30], weaponset[30];
if (sscanf(params, "u", giveid)) return SendClientMessage(playerid, 0x6FFF00FF,...
Forum: Scripting Help 20/05/2017, 12:10 PM
Replies: 28
Views: 601
Posted By Aly
Re: Expression [REP]

You're not using the function "format" properly.
Here's an example of using "format":

new string[128];
new value = 10, Float:floatValue = 12.0, text[3];
format(text, sizeof(text), "Hi");...
Forum: Scripting Help 20/05/2017, 08:58 AM
Replies: 11
Views: 714
Posted By Aly
Re: MySQL Selection

As it was answered before you can print something like

(121) Infernus
(321) Turismo


Where 121 is the vehicleid of Infernus and 321 is the vehicleid of Turismo.
You can obtain it with
...
Forum: Scripting Help 19/05/2017, 11:52 PM
Replies: 15
Views: 614
Posted By Aly
Re: Loading system failing

I tried to rewrite your code a little bit.Here's what I did:


#include <a_samp>
#include <YSI\y_ini>

#define DIALOG_REGISTER 2
#define DIALOG_LOGIN 3
#define DIALOG_SEX 4
Forum: Scripting Help 19/05/2017, 09:07 PM
Replies: 5
Views: 396
Posted By Aly
Re: error 033: array must be indexed (variable "-unknown-")

if(!sscanf(...))
{
//do something
}
else
{
//error
}
Showing results 1 to 25 of 219

 

All times are GMT. The time now is 09:46 PM.


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