10.11.2016, 15:14
First of All Hi guyz i miss you so much
now.. When i joined my server i saw The NPCS Chat but i dont know Where i save NPC To Edit Messages how to i can Find my NPC File?
if(strcmp(cmd, "/goto", true) == 0)
{
if(Player[playerid][pAdmin] <= 0)return SendClientMessage(playerid,COLOR_GREY,""#servn" {adadad}Ar Gaqvt Ufleba");
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GRAYWHITE, ""#servn" {ffffff}/goto {ffd1d2}[playerid/PartOfName]");
new Float:g_plocx[3];
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
GetPlayerPos(giveplayerid, g_plocx[0], g_plocx[1], g_plocx[2]);
SetPlayerPos(playerid, g_plocx[0]+1, g_plocx[1], g_plocx[2]+1.0);//plocy+1
}
else
{
format(stringiii, sizeof(stringiii), ""#servn" {ffffff}%d {ffd1d2}Es Motamashe Araa Shemosuli", giveplayerid);
SendClientMessage(playerid, COLOR_RED, stringiii);
}
return 1;
}
CMD:goto(playerid, params[])
{
new cible;
if(sscanf(params, "u", cible)) return SCM(playerid, -1, "/goto [playerid/name]");
if(!IsPlayerConnected(cible))
return 1;
new Float:x,
Float:y,
Float:z;
GetPlayerPos(cible, x, y, z);
SetPlayerPos(playerid, x+1, y+1, z);
SetPlayerInterior(playerid, GetPlayerInterior(cible));
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(cible));
return 1;
}
Or if use zmcd with ssanf which is more faster than strcmp:
PHP код:
|