if(playerDB[playerid][vip]) { if(!strcmp(cmdtext, "/v ", true,3)){ if(cmdtext[2]==0){SendClientMessage(playerid,GREEN, "* Naudojimas: /v [tekstas]"); return 1;} new zin[256]; format(zin,sizeof(zin),"VIP: %s",cmdtext[3]); SendClientMessageToAll(GREEN,zin); return 1; }
//do /v make it to
CMD:v (playerid,params[])
if(cmdtext[2]==0){SendClientMessage(playerid,GREEN, "* Naudojimas: /v [tekstas]"); return 1;}
new zin[256];
format(zin,sizeof(zin),"VIP: %s",cmdtext[3]);
SendClientMessageToAll(GREEN,zin);
return 1;
}
CMD:v (playerid,params[])
{
if(params[2]==0){SendClientMessage(playerid,GREEN, "* Naudojimas: /v [tekstas]"); return 1;}
new zin[256];
format(zin,sizeof(zin),"VIP: %s",params[3]);
SendClientMessageToAll(GREEN,zin);
return 1;
}
CMD:v (playerid,params[])
{
if(sscanf(params,"c",params))return SendClientMessage(playerid,GREEN, "* Naudojimas: /v [tekstas]");
new zin[256];
format(zin,sizeof(zin),"VIP: %s",params);
SendClientMessageToAll(GREEN,zin);
return 1;
}
C:\Users\Lauryno\Desktop\Servas\gamemodes\bom.pwn( 536) : error 017: undefined symbol "cmdtext"
C:\Users\Lauryno\Desktop\Servas\gamemodes\bom.pwn( 536) : warning 215: expression has no effect C:\Users\Lauryno\Desktop\Servas\gamemodes\bom.pwn( 536) : error 001: expected token: ";", but found "]" C:\Users\Lauryno\Desktop\Servas\gamemodes\bom.pwn( 536) : error 029: invalid expression, assumed zero C:\Users\Lauryno\Desktop\Servas\gamemodes\bom.pwn( 536) : fatal error 107: too many error messages on one line |
CMD:v( playerid, params[ ] )
{
new
lsText[ 128 ]
;
if ( sscanf( params, "s[128]", lsText ) )
return SendClientMessage(playerid,GREEN, "* Naudojimas: /v [tekstas]");
new zin[256];
format(zin,sizeof(zin),"VIP: %s",lsText);
SendClientMessageToAll(GREEN,zin);
return 1;
}
#define isnull(%1) \
((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
CMD:v( playerid, params[ ] )
{
if( playerDB[ playerid ][ vip ] )
{
if( isnull( params ) ) return SendClientMessage( playerid, GREEN, "* Naudojimas: /v [tekstas]" );
new
zin[ 128 ]
;
format( zin, sizeof( zin ), "VIP: %s", params );
SendClientMessageToAll( GREEN, zin );
}
return 1;
}
Are you using sscanf?
pawn Код:
|
CMD:v( playerid, params[ ] )
{
if( playerDB[ playerid ][ vip ] )
{
if( isnull( params ) ) return SendClientMessage( playerid, GREEN, "* Naudojimas: /v [tekstas]" );
new
zin[ 128 ],
name[ MAX_PLAYER_NAME ]
;
GetPlayerName( playerid, name, MAX_PLAYER_NAME );
format( zin, sizeof( zin ), "VIP [%s]: %s", name, params );
SendClientMessageToAll( GREEN, zin );
}
return 1;
}