12.03.2019, 11:13
Is there a good e-mail plugin for SA-MP or is there possibility to use a Python script in a plugin for SA-MP server?
testfunction("si", "test", 1.0);
this might not be the place to ask for this but..
i need the name of the system that tells me names of different parts of los santos. for example, im on vinewood - textdraw says 'GPS: Vinewood' |
new playerName[MAX_PLAYERS char][MAX_PLAYER_NAME];
GetPlayerName(playerid, playerName{playerid}, MAX_PLAYER_NAME);
printf("%s", playerName{playerid});
Reading a few topics about optimization i've found 'Char-arrays':
pawn Code:
Is there any mistakes in my code or is there something else i have to do to use Char-arrays? |
i want to make a tower climbing minigame. i thought about using virtual worlds for each player so every player has its own tower to climb on (to prevent crowd). i wonder if using 20 virtual worlds at once will cause any lag on my server? thanks in advance
|
That should not be an issue. It might even be faster: when you have 20 players in the same virtual/main world they must all be synced all the time. When everyone is in a seperate world this is not the case.
Atleast that is what I suspect. It seems most logic that way. Correct me if I am wrong, anyone. |
Can somebody provide a tutorial on how to create smooth camera sequences using InterpolateCameraPos/LookAt please?
Ex.: I have 7 different coordinates from which the camera needs to pass through in a x amount of time. Atm, with my code, the camera stops and after an undefined amount of seconds it begins it's second transition, same goes for the third, then the fourth, etc. |
Returning 0 in this callback will pass the dialog to another script in case no matching code were found in your gamemode's callback.
#if defined menu_OnDialogResponse return menu_OnDialogResponse(playerid, dialogid, response, listitem, inputtext); #else return 1; // Should it be 0 or 1 ? #endif
If i hook OnDialogResponse with ALS method, should i return 0 at the end as said in the Wiki?
Code:
Returning 0 in this callback will pass the dialog to another script in case no matching code were found in your gamemode's callback. Code:
#if defined menu_OnDialogResponse return menu_OnDialogResponse(playerid, dialogid, response, listitem, inputtext); #else return 1; // Should it be 0 or 1 ? #endif |
UpdatePlayerPass(playerid, newpass[]) { for(new i = 0; i < 16; i++) Player[playerid][Salt][i] = random(94) + 33; SHA256_PassHash(newpass, Player[playerid][Salt], Player[playerid][Password], 64); mysql_format(g_SQL, query, sizeof query, "UPDATE `players` SET `Password` = %s, 'Salt' = %e WHERE `ID` = %d LIMIT 1", Player[playerid][Password],Player[playerid][Salt], Player[playerid][ID]); mysql_tquery(g_SQL, query); return 1; }
UpdatePlayerKills(killerid, killNumber) { if (killerid == INVALID_PLAYER_ID) return 0; if (Player[killerid][LoggedIn] == false) return 0; Player[killerid][Killovi] += killNumber; SetPlayerScore(killerid, GetPlayerScore(killerid) + killNumber); mysql_format(g_SQL, query, sizeof query, "UPDATE `players` SET `Killovi` = %d WHERE `ID` = %d LIMIT 1", Player[killerid][Killovi], Player[killerid][ID]); mysql_tquery(g_SQL, query); return 1; }
I need help, updating player passwords won't work
Code:
UpdatePlayerPass(playerid, newpass[]) { for(new i = 0; i < 16; i++) Player[playerid][Salt][i] = random(94) + 33; SHA256_PassHash(newpass, Player[playerid][Salt], Player[playerid][Password], 64); mysql_format(g_SQL, query, sizeof query, "UPDATE `players` SET `Password` = %s, 'Salt' = %e WHERE `ID` = %d LIMIT 1", Player[playerid][Password],Player[playerid][Salt], Player[playerid][ID]); mysql_tquery(g_SQL, query); return 1; } |