13.08.2014, 02:07
(
Последний раз редактировалось Tommeh; 13.08.2014 в 07:48.
)
I got this code to where if you type /house tommeh, the player would teleport to the player's house, but how can i get this code to where if i type /house tom, or /house tomm, or even /house t, it knows that somebody has a file with those letters and executes the command?
Код:
dcmd_house(playerid, params[]) { #pragma unused params new file[128]; new pname[32]; new Float:HouseX, Float:HouseY, Float:HouseZ; if(sscanf(params, "s", pname)) return SendClientMessage(playerid, COLOR_ORANGE, "/house <Name>"); format(file, sizeof(file), "/xadmin/Users/%s.ini", pname); if(!dini_Exists(file))return SendClientMessage(playerid, COLOR_RED,"That Player doesn't have a house"); HouseX = dini_Float(file, "HouseX"); HouseY = dini_Float(file, "HouseY"); HouseZ = dini_Float(file, "HouseZ"); SetPlayerPos(playerid,HouseX,HouseY,HouseZ); return 1; }