05.07.2012, 16:03
Quote:
Hello, I'm trying to make something..
C++: Код:
int playerid = params[1]; int idx; if(!amx_FindPublic(amx,"__GetPlayerName",&idx)){ cell ret; cell* str_phys; cell amxaddr; amx_Push(amx,playerid); amx_Allot(amx,24,&amxaddr,&str_phys); amx_Push(amx,amxaddr); amx_Exec(amx,&ret,idx); char name[24]; amx_GetString(name,str_phys,0,24); amx_Release(amx,amxaddr); printf("%s",name); }else{ printf("Native"); } Код:
forward __GetPlayerName(playerid,name[]); public __GetPlayerName(playerid,name[]){ GetPlayerName(playerid,name,MAX_PLAYER_NAME); } P.S: I don't want to use invoke or gdk.I want to make this. P.S: playerid is correct.I tested. |