Re: Little coding questions - For general minor queries 5 -
Dj_maryo1993 - 24.02.2014
Hi , i have a small problem , after i login i dont spawn
Code:
stock LoadStats(playerid)
{
/// Blabla loading variabiles and stuff
SpawnPlayer(playerid);
return 1;
}
Also i have :
Code:
public OnPlayerRequestClass(playerid, classid)
{
SpawnPlayer(playerid);
return 1;
}
But i still cant get the player to spawn after he logins
LE : Fixed , i just made a timer to show the player the login menu after 0.1 seconds
Re: Little coding questions - For general minor queries 5 -
kristo - 23.03.2014
When i'm using player textdraws, do I need an array for them?
Re: Little coding questions - For general minor queries 5 -
Redirect Left - 25.03.2014
Does anyone know what could cause a player to fly upwards, when being spawned into a vehicle? (or just in general)
Re: Little coding questions - For general minor queries 5 -
seanny - 25.03.2014
Quote:
Originally Posted by Redirect Left
Does anyone know what could cause a player to fly upwards, when being spawned into a vehicle? (or just in general)
|
Do you want to know how to code this or prevent this?
Re: Little coding questions - For general minor queries 5 -
Redirect Left - 25.03.2014
Well, I thought 'what would cause' would indicate it was a problem. So I need to prevent it
Re: Little coding questions - For general minor queries 5 -
seanny - 25.03.2014
Quote:
Originally Posted by Redirect Left
Well, I thought 'what would cause' would indicate it was a problem. So I need to prevent it 
|
Well personally, I ain't aware of this type of problem as I have never experienced it.
I'll give some code later which might prevent it (needs scripting + testing).
Re: Little coding questions - For general minor queries 5 -
Redirect Left - 25.03.2014
Well, It happens when I try to create a car and PutPlayerInVehicle, so I am assuming something is going wrong, but I can't figure out what. So i'm just hoping someone has experienced this and can give a reason, i've tried to use if(!IsPlayerInAnyVehicle){ // put player back in the vehicle } but that doesn't help.
Re: Little coding questions - For general minor queries 5 -
Redirect Left - 25.03.2014
Quote:
Originally Posted by [HLF]Southclaw
I've seen the "flying upwards" thing happen with spectating sometimes (try to spawn the player while they are spectating and a few other conditions cause it)
|
Bleh, of course. You were right, I had forgot to reset their spectating to zero. Thanks.
Re: Little coding questions - For general minor queries 5 -
iFarbod - 31.03.2014
Can UsePlayerPedAnims(); configured with plugin?
like this :
UsePlayerAnimGrp();
UseManAnimGrp();
UseWomanAnimGrp();
UseGang1AnimGrp();
UseGang2AnimGrp();
UseSWATAnimGrp();
...
Or
UsePlayerPedAnims(playerid); // for one player, not all
is it possible with plugin?
Re: Little coding questions - For general minor queries 5 -
Niko_boy - 31.03.2014
So far i can think is a No.
You can play with ApplyAnimation and some correct timing with key states and play animations but that wont do any good.
Re: Little coding questions - For general minor queries 5 -
kristo - 01.04.2014
Could something block TogglePlayerControllable effects in OnPlayerSpawn/just after it? For some reason players don't freeze but the native gets called.
Re: Little coding questions - For general minor queries 5 -
RajatPawar - 15.04.2014
How would I avoid this?
pawn Код:
new arr_3D[][][] =
{
{
{float:12.0, float:124.1, float:14.6},
{float:5.1, float:15.1, float:56.7},
{"Hello"}
}
};
because doing this
pawn Код:
new Float: arr_3D[][][] =
{
{
{12.0, 124.1, 14.6},
{5.1, 15.1, 56.7},
{"Hello"}
}
};
gives a tag mismatch on the string lines.. Thanks!
Re: Little coding questions - For general minor queries 5 -
RajatPawar - 15.04.2014
Quote:
Originally Posted by [HLF]Southclaw
Look up enumerators in the language pdf. You'll want two float arrays of 3 cells then a regular array for the string in the enumerator structure. And remove the third array dimension as that's handled by the enumerator.
Enumerators can also make arrays appear 4 dimensional by embedding an array within the enumerator then initialising the enumerator occupying the third dimension; then you can address the "forth" dimension by using the array within the enumerator definition.
pawn Код:
enum E_4D{str1[32], str2[32]} new arr[][][E_4D]; ... arr[0][0][str1] = "hello"; printf("%c", arr[0][0][str1][0]); // prints h
|
Yes, I know that! But I was asking if there was a way of doing it with an array...
Re: Little coding questions - For general minor queries 5 -
ExcelGaming - 16.04.2014
I'm having a problem with the pay system for all factions. I set the payments in the .ini files. Example: LSPD.ini pay0 = 150. I save the file and then I go to restart my server and then it resets back to pay0 = 53. I don't know what the problem is. If it has something to do with the script or file but I'm not too sure. If someone is familar with the gamemode or know's what the problem is then please let me know.
GAMEMODE
Re: Little coding questions - For general minor queries 5 -
Dignity - 17.04.2014
Quote:
Originally Posted by ExcelGaming
I'm having a problem with the pay system for all factions. I set the payments in the .ini files. Example: LSPD.ini pay0 = 150. I save the file and then I go to restart my server and then it resets back to pay0 = 53. I don't know what the problem is. If it has something to do with the script or file but I'm not too sure. If someone is familar with the gamemode or know's what the problem is then please let me know.
GAMEMODE
|
Your link doesn't work. Can you PM it to me please?
Re: Little coding questions - For general minor queries 5 -
newbie scripter - 17.04.2014
its from the sa-mp scripts website. copy "/post/14664/American_Roleplay/micha654/gamemodes/rp" and add it in the edn of "http://******************/"
Re: Little coding questions - For general minor queries 5 -
kristo - 17.04.2014
pawn Код:
#include <a_samp>
new dimarray[][] =
{
{10, 69, 27},
{22, 33, 44},
{15, 16, 9}
};
main() {}
public OnGameModeInit()
{
PrintArray(dimarray[][0]); // How should this be?
return 1;
}
stock PrintArray(array[3])
{
for (new i, j = sizeof(array); i < j; i++) printf("%i", array[i]);
return 1;
}
How could I access the second dimension and print values 10, 22 and 15?
Re: Little coding questions - For general minor queries 5 -
]Rafaellos[ - 17.04.2014
pawn Код:
PrintArray(dimarray[0][0]); //10
PrintArray(dimarray[1][0]); //22
PrintArray(dimarray[2][0]); //15
Re: Little coding questions - For general minor queries 5 -
kristo - 17.04.2014
Did you even look at the function?
Edit: Basically I could do this but I know that there must be a better way...
pawn Код:
public OnGameModeInit()
{
const temp = sizeof(dimarray[]);
new temparray[temp];
for (new i; i < temp; i++) temparray[i] = dimarray[i][0];
PrintArray(temparray);
return 1;
}
Re: Little coding questions - For general minor queries 5 -
RajatPawar - 17.04.2014
Quote:
Originally Posted by kvann
Did you even look at the function?
Edit: Basically I could do this but I know that there must be a better way...
pawn Код:
public OnGameModeInit() { const temp = sizeof(dimarray[]); new temparray[temp]; for (new i; i < temp; i++) temparray[i] = dimarray[i][0]; PrintArray(temparray); return 1; }
|
EDIT: Thank you Konstantinos, silly mistake of mine, OP - look below.