ZCMD Problem
#1

Код:
new id = GetPVarInt(playerid,"ClickedPlayer");
               cmd_tp(playerid,id);
And this is command:
Код:
CMD:tp(playerid, params[])
{
    
    if(GetPlayerWantedLevel(playerid)>>0) return DIALOG10(playerid);
    new tp;
    if(sscanf(params, "i", tp))return SendClientMessage(playerid, -1, "{FFFF80}* /tp [玩家ID] 传送某个玩家");
    if(PlayerInfo[tp][pLogin]==0) return Dialog(playerid,999,DIALOG_STYLE_MSGBOX,"{FF0000}警告","{FF0000}这个玩家未登录\n\n按Tab查看玩家ID","Okay","");
    if(playerid==tp) return Dialog(playerid,999,DIALOG_STYLE_MSGBOX,"{FF0000}警告","{FF0000}无法传送自己","Okay","");
    if(TeleMode[tp]==1) return Dialog(playerid,999,DIALOG_STYLE_MSGBOX,"{FF0000}警告","{FF0000}他关闭了传送\n私聊他试试看吧! /p私聊","Okay","");
    if(GameMode[tp]>>0) return Dialog(playerid,999,DIALOG_STYLE_MSGBOX,"{FF0000}警告","{FF0000}他不在自由模式\n无法传送","Okay","");
    if(GetPVarInt(tp,"IIH")==1) return Dialog(playerid,999,DIALOG_STYLE_MSGBOX,"{FF0000}警告","{FF0000}他在房子里","Okay","");
    new Float:x, Float:y, Float:z;
    new string[128], pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
    format(string, sizeof(string), "{FFFF80}传送: %s 传送到了你身边 (如果你觉得烦请输入/ctp)",pName);
	SendClientMessage(tp,-1,string);
	GetPlayerPos(tp, x, y, z);
	SetPlayerPos(playerid,x,y,z);
	SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(tp));
	SetPlayerInterior(playerid,GetPlayerInterior(tp));
    return 1;
}
Pawno give me warning:
Код:
error 035: argument type mismatch (argument 2)
warning 204: symbol is assigned a value that is never used: "id"
Can I force player use command?
Reply
#2

anyone?
Reply
#3

https://sampwiki.blast.hk/wiki/Valstr
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)