if(sscanf(params,"u",OtherPlayer)) return SendClientMessage(playerid,Vermelho,"Use: "BrancoChat"/ir [ID]");
public OnPlayerCommandPerformed(playerid, cmdtext[], success) { new String[999]; if(!success) { format(String, sizeof(String), "Erro:"BrancoChat" O Comando "AzulBebeChat"%s"BrancoChat" nгo existe, Para Mais Informaзхes Digite "VermelhoChat"(/ajuda)", cmdtext); SendClientMessage(playerid, Vermelho, String); } return 1; }
tenho esse code aqui no meu /ir:
Код:
if(sscanf(params,"u",OtherPlayer)) return SendClientMessage(playerid,Vermelho,"Use: "BrancoChat"/ir [ID]"); Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success) { new String[999]; if(!success) { format(String, sizeof(String), "Erro:"BrancoChat" O Comando "AzulBebeChat"%s"BrancoChat" nгo existe, Para Mais Informaзхes Digite "VermelhoChat"(/ajuda)", cmdtext); SendClientMessage(playerid, Vermelho, String); } return 1; } |
//Linha do comando, strcmp etc..
if(sscanf(params,"u",OtherPlayer)) return SendClientMessage(playerid,Vermelho,"Use: "BrancoChat"/ir [ID]");
new String[999];
format(String, sizeof(String), "Erro:"BrancoChat" O Comando "AzulBebeChat"%s"BrancoChat" nгo existe, Para Mais Informaзхes Digite "VermelhoChat"(/ajuda)", cmdtext);
SendClientMessage(playerid, Vermelho, String);
return 1;
}
if(sscanf(params,"u",OtherPlayer))
{
SendClientMessage(playerid,Vermelho,"Use: "BrancoChat"/ir [ID]");
return 1;
}
tenta assim:
pawn Код:
|
if(sscanf(params,"u",OtherPlayer))
return SendClientMessage(playerid,Vermelho,"Use: \"BrancoChat\"/ir [ID]");
COMMAND:ir(playerid, params[], ispassenger) { if(player_preso_haha[playerid]) return 0; new OtherPlayer; if(GetPlayerMoney(playerid) <= 100) return SendClientMessage(playerid,Vermelho,"Custo: "VerdeClaroChat"R$100"); if(sscanf(params,"u",OtherPlayer)) { SendClientMessage(playerid,Vermelho,"Use: "BrancoChat"/ir [ID]"); return 1; } if(player_preso_haha[OtherPlayer]) return SendClientMessage(playerid,Vermelho,"Este Usuбrio Esta Preso"); if(GetPlayerVirtualWorld(OtherPlayer) > 0) return SendClientMessage(playerid,Vermelho,"Esse Usuбrio esta em Dimenção De Evento."); GetPlayerName(playerid, pname, MAX_PLAYER_NAME); GetPlayerName(OtherPlayer, opname, MAX_PLAYER_NAME); if(!IsPlayerAdmin(playerid)) { format(stringa, sizeof(stringa), "%s"AmareloChat" foi atй o Jogador "AzulBebeChat"%s"VermelhoChat" (/ir "AzulBebeChat"[ID]"VermelhoChat")", pname, opname); SendClientMessageToAll(Vermelho, stringa); } if(IsPlayerAdmin(playerid)) { format(stringa, sizeof(stringa), ""VerdeClaroChat"[ADM]"RoxoChat"%s"AmareloChat" foi atй o Jogador "AzulBebeChat"%s"VermelhoChat" (/ir "AzulBebeChat"[ID]"VermelhoChat")", pname, opname); SendClientMessageToAll(Branco, stringa); } new IntID,WorldID,Float:Pos[3]; IntID = GetPlayerInterior(OtherPlayer); WorldID = GetPlayerVirtualWorld(OtherPlayer); GetPlayerPos(OtherPlayer,Pos[0],Pos[1],Pos[2]); GivePlayerMoney(playerid,-100); if(IsPlayerInAnyVehicle(OtherPlayer)) { if(ispassenger && IsVehicleOcupado(GetPlayerVehicleID(OtherPlayer)) != 1) { PutPlayerInVehicle(playerid,GetPlayerVehicleID(OtherPlayer),1); return 1; } if(ispassenger && IsVehicleOcupado(GetPlayerVehicleID(OtherPlayer)) != 2) { PutPlayerInVehicle(playerid,GetPlayerVehicleID(OtherPlayer),2); return 1; } if(ispassenger && IsVehicleOcupado(GetPlayerVehicleID(OtherPlayer)) != 3) { PutPlayerInVehicle(playerid,GetPlayerVehicleID(OtherPlayer),3); return 1; } if(ispassenger && IsVehicleOcupado(GetPlayerVehicleID(OtherPlayer)) != 4) { PutPlayerInVehicle(playerid,GetPlayerVehicleID(OtherPlayer),4); return 1; } } else if(IsPlayerInRangeOfPoint(playerid,100,-1316.7874,2510.4839,86.6670)) { SetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]); SetPlayerVirtualWorld(playerid,0); SetPlayerInterior(playerid,0); return 1; } else if(IsPlayerInAnyVehicle(playerid)) { SetVehiclePos(GetPlayerVehicleID(playerid),Pos[0],Pos[1],Pos[2]); SetVehicleVirtualWorld(GetPlayerVehicleID(playerid),WorldID); LinkVehicleToInterior(GetPlayerVehicleID(playerid),IntID); if(ispassenger && IsVehicleOcupado(GetPlayerVehicleID(playerid)) != 1) { PutPlayerInVehicle(OtherPlayer,GetPlayerVehicleID(playerid),1); return 1; } if(ispassenger && IsVehicleOcupado(GetPlayerVehicleID(playerid)) != 2) { PutPlayerInVehicle(OtherPlayer,GetPlayerVehicleID(playerid),2); return 1; } if(ispassenger && IsVehicleOcupado(GetPlayerVehicleID(playerid)) != 3) { PutPlayerInVehicle(OtherPlayer,GetPlayerVehicleID(playerid),3); return 1; } if(ispassenger && IsVehicleOcupado(GetPlayerVehicleID(playerid)) != 4) { PutPlayerInVehicle(OtherPlayer,GetPlayerVehicleID(playerid),4); return 1; } return 1; } else { SetPlayerInterior(playerid,IntID); SetPlayerVirtualWorld(playerid,WorldID); SetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]); } return 1; }