pawn Код:
|
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & 2)
{
if (strcmp("/abrirvip", cmdtext, true, 10) == 0)
{
if(!IsPlayerAdmin(playerid))
{
MoveObject(Portao, 1548.181,-2296.253,9.544, 5.0);
SendClientMessage(playerid, COLOR_GREEN, "Portгo do Estacionamento Vip Aberto");
return 1;
}
bom sу para vips usarem voce teria q ter um sistema de vip... caso vc nao tenha eu nao saberei ajudar voc pois sou iniciante tbm
olha ai tem o code pro portao abrir testa ai fiz aqui mesmo e pro portao fechar eu nao sei mais aqui nesse link й um tutu e quando a pessoa vai pra longe do porta fecha sozim se vc conseguir entender https://sampforum.blast.hk/showthread.php?tid=360789 bom й isso ai fui se voc usar um sistema de vip me passa um comando dele que eu falo como faz suav pawn Код:
|
if(strcmp(tmp, "vender", true) == 0) { if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, playername, sizeof(playername)); if(PlayerInfo[playerid][pCarKey] == 0 && PlayerInfo[playerid][pCarKey2] == 0) { SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem um Carro VIP."); return true; } if(PlayerInfo[playerid][pCarKey] != vehid && PlayerInfo[playerid][pCarKey2] != vehid) { SendClientMessage(playerid, COLOR_GREY, "Esse nгo й seu Carro VIP."); return true; } if(PlayerInfo[playerid][pCarKey] != 0 && strcmp(playername, CarInfo[PlayerInfo[playerid][pVeiculo]][cOwner], true) == 0) { new car = PlayerInfo[playerid][pVeiculo]; CarInfo[car][cOwned] = 0; CarInfo[car][cModel] = 560; CarInfo[car][cColorOne] = 0; CarInfo[car][cColorTwo] = 0; GetPlayerName(playerid, sendername, sizeof(sendername)); strmid(CarInfo[car][cOwner], "Dealership", 0, strlen("Dealership"), 999); GivePlayerMoney(playerid,CarInfo[car][cValue]); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); format(string, sizeof(string), "~w~Carro Vip Vendido Por: ~n~~g~$%d", CarInfo[car][cValue]); GameTextForPlayer(playerid, string, 10000, 3); RemovePlayerFromVehicleEx(playerid); Controle(playerid, 1); PlayerInfo[playerid][pCarKey] = 0; PlayerInfo[playerid][pVeiculo] = 0; SaveCars(); return true; } |
if(PlayerInfo[playerid][pCarKey] == 0 && PlayerInfo[playerid][pCarKey2] == 0) return SendClientMessage(playerid, -1, "Vocк nгo й VIP");
pelo que entendi esse й a val que define se o player й vip ou nao
pawn Код:
|
C:\Documents and Settings\\Desktop\\filterscripts\estacionamento.pwn(105) : error 017: undefined symbol "PlayerInfo"
C:\Documents and Settings\\Desktop\\filterscripts\estacionamento.pwn(105) : warning 215: expression has no effect
C:\Documents and Settings\\Desktop\\filterscripts\estacionamento.pwn(105) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\\Desktop\\filterscripts\estacionamento.pwn(105) : error 029: invalid expression, assumed zero
C:\Documents and Settings\\Desktop\\filterscripts\estacionamento.pwn(105) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
public OnPlayerCommandText(playerid, cmdtext[])
{
//----------------------------
if (strcmp("/abrirvip", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][pCarKey] == 0 && PlayerInfo[playerid][pCarKey2] == 0) return SendClientMessage(playerid, -1, "Vocк nгo й VIP");
{
MoveObject(Portao, 1548.181,-2296.253,9.544, 5.0);
SendClientMessage(playerid, COLOR_GREEN, "Portгo do Estacionamento Vip Aberto");
return 1;
}
}
//================================================== ================================================== ===============
if (strcmp("/fecharvip", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][pCarKey] == 0 && PlayerInfo[playerid][pCarKey2] == 0) return SendClientMessage(playerid, -1, "Vocк nгo й VIP");
{
MoveObject(Portao, 1547.677,-2296.252,15.544, 5.0);
SendClientMessage(playerid, COLOR_RED, "Portгo do Estacionamento Vip Fechado");
return 1;
}
}
return 0;
}
pawn Код:
|
if(PlayerInfo[playerid][pCarKey] == 0 )
pawn Код:
|