Cara Save Data Lokasi Kendaraan Terakhir MySQL plugin R41-4 Pawn Scripting IsValidVehicle SAMP GTA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <a_samp> | |
#include <a_mysql> // MySQL plugin R41-4 | |
SavePlayer(playerid) // ini adalah fungsi callback saveplayer untuk simpan data ke mysql | |
{ | |
// simpan posisi mobil. | |
GetVehiclePos(mobilplayer1[playerid], Float:pInfo[playerid][pMx], Float:pInfo[playerid][pMy], Float:pInfo[playerid][pMz]); | |
new kordinatmobil[500]; | |
format(kordinatmobil, 500, "UPDATE `playerdata` SET `pmx` = '%f',`pmy` = '%f',`pmz` = '%f' WHERE `id` = '%i' LIMIT 1", Float:pInfo[playerid][pMx], Float:pInfo[playerid][pMy], Float:pInfo[playerid][pMz], pInfo[playerid][ID]); | |
mysql_query(MySQL:g_Sql, kordinatmobil[499], bool:true); | |
SendClientMessage(playerid, -1, kordinatmobil); | |
printf("Mobil pindah posisi ke %f, %f, %f ke pemilik ID %i", Float:pInfo[playerid][pMx], Float:pInfo[playerid][pMy], Float:pInfo[playerid][pMz], pInfo[playerid][ID]); | |
//this basically gets the variables and stores it to the players special identifier called "ID". | |
// ini untuk kasi tau kalau sudah selesai penyembutan posisinya. | |
new Float:healthmp1; | |
GetVehicleHealth(mobilplayer1[playerid], Float:healthmp1); | |
return 1; | |
} | |
bang kamu mau jadi dev ku
ReplyDeletebang aku mau order interior bisakah mau chat mana atau punya discord kah?
ReplyDeleteAku jual interior, mau interior mana?
Delete