stock LoadDataString(playerid) { new query[300], pName[24], savingstring[10]; GetPlayerName(playerid, pName, 24); format(query, sizeof(query), "SELECT * FROM `playerchar` WHERE `charname` = '%s'", pName); mysql_query(query); mysql_store_result(); while(mysql_fetch_row_format(query,"|")) { mysql_fetch_field_row(savingstring[1], "username"); strmid(PlayerInfo[playerid][uName], savingstring[1], 0, strlen(savingstring[1]), 255); mysql_fetch_field_row(savingstring[2], "origin"); strmid(PlayerInfo[playerid][pOrigin], savingstring[2], 0, strlen(savingstring[2]), 255); } mysql_free_result(); }
CMD:stats(playerid, params[]) { if(IsPlayerConnected(playerid)) { new str[128]; format(str, sizeof(str), "Username: %s | Origin: %s", PlayerInfo[playerid][uName], PlayerInfo[playerid][pOrigin]); SendClientMessage(playerid ,0xFFFFFFAA, str); return 1; } return SendClientMessage(playerid, 0xAFAFAFAA, "Kamu harus login terlebih dahulu untuk menggunakan command ini."); }
stock LoadDataString(playerid)
{
new query[300],pName[24];
GetPlayerName(playerid,pName,sizeof(pName));
format(query,sizeof query,"SELECT * FROM `playercar` WHERE `charname`='%s'",pName);
mysql_query(query);
mysql_store_result();
while(mysql_fetch_row_format(quey,"|"))
{
mysql_fetch_field_row(PlayerInfo[playerid][uName],"username");
mysql_fetch_field_row(PlayerInfo[playerid][pOrigin],"origin");
}
mysql_free_result();
}
savingstring[10];
while(mysql_fetch_row_format(query,"|")) { mysql_fetch_field_row(savingstring[1], "username"); strmid(PlayerInfo[playerid][uName], savingstring[1], 0, strlen(savingstring[1]), 255); mysql_fetch_field_row(savingstring[2], "origin"); strmid(PlayerInfo[playerid][pOrigin], savingstring[2], strlen(savingstring[1]), strlen(savingstring[2]), 255); }
strmid(string, "Extract 'HELLO' without the !!!!: HELLO!!!!", 34, 39); //string contains "HELLO"
Hello!
Try this: PHP код:
PHP код:
|
Код HTML:
while(mysql_fetch_row_format(query,"|")) { mysql_fetch_field_row(savingstring[1], "username"); strmid(PlayerInfo[playerid][uName], savingstring[1], 0, strlen(savingstring[1]), 255); mysql_fetch_field_row(savingstring[2], "origin"); strmid(PlayerInfo[playerid][pOrigin], savingstring[2], strlen(savingstring[1]), strlen(savingstring[2]), 255); } PHP код:
|
stock LoadDataString(playerid)
{
new query[300], pName[24], savingstr1[10], savingstr2[10];
GetPlayerName(playerid, pName, 24);
format(query, sizeof(query), "SELECT * FROM `playerchar` WHERE `charname` = '%s'", pName);
mysql_query(query);
mysql_store_result();
while(mysql_fetch_row_format(query,"|"))
{
mysql_fetch_field_row(savingstr1, "username");
strmid(PlayerInfo[playerid][uName], savingstr1, 0, strlen(savingstr1));
mysql_fetch_field_row(savingstr2, "origin");
strmid(PlayerInfo[playerid][pOrigin], savingstr2, 0, strlen(savingstr2));
}
mysql_free_result();
}
Try it
PHP код:
|
{ mysql_fetch_field_row(savingstr1, "username"); strmid(PlayerInfo[playerid][uName], savingstr1, 0, strlen(savingstr1), 255); mysql_fetch_field_row(savingstr2, "origin"); strmid(PlayerInfo[playerid][pOrigin], savingstr2, 0, strlen(savingstr2), 255); }