GTA Közösség - A magyar GTA fórum

San Andreas Multiplayer (SA-MP) => SA-MP: Szerverfejlesztés => Segítségkérés => A témát indította: The - 2012. március 11. - 17:41:40

Cím: Névre szóló parancs
Írta: The - 2012. március 11. - 17:41:40
Üdv.

Valaki leírná, hogy tudom megcsinálni azt, hogy egy parancsot egy ember tudjon használni szóval névre szóló legyen?


Valamiért nem sikerült.
Cím: Névre szóló parancs
Írta: CANNONN - 2012. március 11. - 17:45:04
CMD:parancs(playerid, params[])
{
new nev[MAX_PLAYER_NAME];
if (strfind(nev, \"Szabyxxx\", true))
{
// Függvények
}
return 1;
}
Cím: Névre szóló parancs
Írta: N@rbirock - 2012. március 11. - 17:45:55
   if(!strcmp(\"/xyz\",cmdtext,true))
{
    new PlayerName[24];
       GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
   if(strcmp(PlayerName,\"Név\",true))//ide írod a nevet
{
             SendClientMessage(playerid,red,\"» Sajnálom! Csak xyz teleportálhat ide!\"); //ide hogy mit tegyen ha nem az a neve
}
else
{
   //ide ha az a neve
}
}