07.12.2012, 02:53
Como fazer pra Proibir que um player escreva algo no chat antes de ele escolher seu personagem ? antes de ele apertar Spawn ... alguem sabe ?
new Spawnado[MAX_PLAYERS];
OnPlayerSpawn
{
Spawnado[playerid] == 1;
resto
}
Onplayerdeath
{
Spawnado[playerid] == 0;
resto
}
OnPlayerDisconnect
{
Spawnado[playerid] == 0;
resto
}
OnPlayerText
{
If(Spawnado != 1) { SendClientMessage(playerid,-1,"Vocк ainda nao fez spawn portanto nгo pode falar"); return 1; }
else
{
aзoes que tem no falar
}
//Topo do gm
new VarBlock[ MAX_PLAYERS ];
public OnPlayerConnect( playerid )
{
VarBlock[ playreid ] = true;
return true;
}
public OnPlayerText( playerid, text[] )
{
switch( VarBlock[ playreid ] )
{
case 0: return true;
case 1: return false;
}
return false;
}
public OnPlayerSpawn( playerid )
{
VarBlock[ playreid ] = true;
return true;
}
C:\Users\cliente\Desktop\Nova pasta (2)\Brasil Auto Estrada\gamemodes\BAE.pwn(302) : error 055: start of function body without function header
C:\Users\cliente\Desktop\Nova pasta (2)\Brasil Auto Estrada\gamemodes\BAE.pwn(304) : error 010: invalid function or declaration
C:\Users\cliente\Desktop\Nova pasta (2)\Brasil Auto Estrada\gamemodes\BAE.pwn(443) : error 055: start of function body without function header
C:\Users\cliente\Desktop\Nova pasta (2)\Brasil Auto Estrada\gamemodes\BAE.pwn(444) : error 010: invalid function or declaration
C:\Users\cliente\Desktop\Nova pasta (2)\Brasil Auto Estrada\gamemodes\BAE.pwn(446) : error 010: invalid function or declaration
C:\Users\cliente\Desktop\Nova pasta (2)\Brasil Auto Estrada\gamemodes\BAE.pwn(447) : error 010: invalid function or declaration
C:\Users\cliente\Desktop\Nova pasta (2)\Brasil Auto Estrada\gamemodes\BAE.pwn(449) : error 010: invalid function or declaration
C:\Users\cliente\Desktop\Nova pasta (2)\Brasil Auto Estrada\gamemodes\BAE.pwn(731) : error 055: start of function body without function header
C:\Users\cliente\Desktop\Nova pasta (2)\Brasil Auto Estrada\gamemodes\BAE.pwn(733) : error 010: invalid function or declaration
C:\Users\cliente\Desktop\Nova pasta (2)\Brasil Auto Estrada\gamemodes\BAE.pwn(1369) : warning 203: symbol is never used: "VarBlock"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
9 Errors.
public OnPlayerConnect(playerid){
SetPVarInt(playerid, "Lock", 0);
return true;
}
public OnPlayerText( playerid, text[] )
{
if(!GetPVarInt(playerid, "Lock")){
return SendClientMessage(playerid, -1, "Vocк ainda nгo escolheu seu personagem, escolha para falar."), 0;
}
return false;
}
public OnPlayerSpawn( playerid )
{
if(!GetPVarInt(playerid, "Lock")){
SetPVarInt(playerid, "Lock", 1);
}
return true;
}
if(!GetPVarInt(playerid, "Lock")){
return SendClientMessage(playerid, -1, "Vocк ainda nгo escolheu seu personagem, escolha para falar."), 0;
}
C:\Users\cliente\Desktop\Nova pasta (2)\Brasil Auto Estrada\gamemodes\BAE.pwn(300) : error 021: symbol already defined: "SetPVarInt"
C:\Users\cliente\Desktop\Nova pasta (2)\Brasil Auto Estrada\gamemodes\BAE.pwn(301) : error 010: invalid function or declaration
C:\Users\cliente\Desktop\Nova pasta (2)\Brasil Auto Estrada\gamemodes\BAE.pwn(441) : error 055: start of function body without function header
C:\Users\cliente\Desktop\Nova pasta (2)\Brasil Auto Estrada\gamemodes\BAE.pwn(442) : error 010: invalid function or declaration
C:\Users\cliente\Desktop\Nova pasta (2)\Brasil Auto Estrada\gamemodes\BAE.pwn(443) : error 010: invalid function or declaration
C:\Users\cliente\Desktop\Nova pasta (2)\Brasil Auto Estrada\gamemodes\BAE.pwn(446) : error 010: invalid function or declaration
C:\Users\cliente\Desktop\Nova pasta (2)\Brasil Auto Estrada\gamemodes\BAE.pwn(729) : error 055: start of function body without function header
C:\Users\cliente\Desktop\Nova pasta (2)\Brasil Auto Estrada\gamemodes\BAE.pwn(730) : error 010: invalid function or declaration
C:\Users\cliente\Desktop\Nova pasta (2)\Brasil Auto Estrada\gamemodes\BAE.pwn(734) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
9 Errors.
#include a_samp
new bool:DonText[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
DonText[playerid] = false;
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
DonText[playerid] = true;
return 1;
}
public OnPlayerText(playerid, text[])
{
if(DonText[playerid] == false)return 0;
return 0;
}
PHP код:
|